mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add coverage targets for target schemes (#1189)
* Changes * Tests and docs * Update fixtures * Update CHANGELOG.md Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com> Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
This commit is contained in:
co-authored by
Yonas Kolb
parent
a10c7c4c24
commit
3b5ca91b76
@@ -326,6 +326,25 @@ class SchemeGeneratorTests: XCTestCase {
|
||||
try expect(xcscheme.testAction?.postActions.count) == 0
|
||||
}
|
||||
|
||||
$0.it("generates target schemes with code coverage options") {
|
||||
var target = app
|
||||
target.scheme = try TargetScheme(
|
||||
gatherCoverageData: true,
|
||||
coverageTargets: [
|
||||
TargetReference(framework.name),
|
||||
]
|
||||
)
|
||||
|
||||
let project = Project(name: "test", targets: [target, framework])
|
||||
let xcodeProject = try project.generateXcodeProject()
|
||||
try expect(xcodeProject.sharedData?.schemes.count) == 1
|
||||
|
||||
let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first)
|
||||
try expect(xcscheme.testAction?.codeCoverageEnabled) == true
|
||||
try expect(xcscheme.testAction?.codeCoverageTargets.count) == 1
|
||||
try expect(xcscheme.testAction?.codeCoverageTargets.first?.blueprintName) == framework.name
|
||||
}
|
||||
|
||||
$0.it("generates scheme using external project file") {
|
||||
prepareXcodeProj: do {
|
||||
let project = try! Project(path: fixturePath + "scheme_test/test_project.yml")
|
||||
|
||||
Reference in New Issue
Block a user