Skip to content

Commit eff6175

Browse files
committed
Opt test out of SPM
1 parent c76beba commit eff6175

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

WorkflowUI/Tests/XCTestCase+Extensions.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ extension XCTestCase {
2424
test: (ViewController) throws -> Void
2525
) rethrows {
2626
guard let rootVC = UIApplication.shared.delegate?.window??.rootViewController else {
27-
XCTFail("Cannot present a view controller in a test host that does not have a root window.")
27+
#if SWIFT_PACKAGE
28+
print("WARNING: Test cannot run in SPM, it requires an app host. Please run WorkflowUI.podspec's tests.")
29+
#else
30+
XCTFail("Cannot present a view controller in a test host that does not have a root window.")
31+
#endif
2832
return
2933
}
3034

0 commit comments

Comments
 (0)