Skip to content

Commit

Permalink
fix: explicit test dependencies (#304)
Browse files Browse the repository at this point in the history
These weren't being picked up on CI but could fail to build locally. The Tuist option to enforce dependencies should help detect similar stuff in the future.
  • Loading branch information
watt authored Oct 3, 2024
1 parent 96bcfd5 commit 2c049c6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ let package = Package(
),
.testTarget(
name: "WorkflowRxSwiftTests",
dependencies: ["WorkflowRxSwiftTesting"],
dependencies: ["WorkflowRxSwiftTesting", "WorkflowReactiveSwift"],
path: "WorkflowRxSwift/Tests"
),
.target(
Expand Down
10 changes: 8 additions & 2 deletions Samples/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ let project = Project(
.unitTest(
for: "WorkflowConcurrency",
sources: "../WorkflowConcurrency/Tests/**",
dependencies: [.external(name: "WorkflowConcurrency")]
dependencies: [
.external(name: "WorkflowConcurrency"),
.external(name: "WorkflowTesting"),
]
),
.unitTest(
for: "WorkflowConcurrencyTesting",
Expand All @@ -201,7 +204,10 @@ let project = Project(
.unitTest(
for: "WorkflowRxSwift",
sources: "../WorkflowRxSwift/Tests/**",
dependencies: [.external(name: "WorkflowRxSwift")]
dependencies: [
.external(name: "WorkflowRxSwift"),
.external(name: "WorkflowReactiveSwift"),
]
),
.unitTest(
for: "WorkflowRxSwiftTesting",
Expand Down
8 changes: 8 additions & 0 deletions Samples/Tuist/Config.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ProjectDescription

let config = Config(
// This breaks snapshot tests, because iOSSnapshotTestCase depends on XCTest.
// ENABLE_TESTING_SEARCH_PATHS should sufficient but doesn't seem to work with
// enforceExplicitDependencies enabled.
// generationOptions: .options(enforceExplicitDependencies: true)
)

0 comments on commit 2c049c6

Please sign in to comment.