Skip to content

Commit 654941c

Browse files
younatanoamfreeman
authored andcommitted
Fix build error when using UI Tests (Quick#1164)
Thanks PointFree for documenting a fix.
1 parent 5a2c27b commit 654941c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import Foundation
22
#if canImport(Testing)
3-
import Testing
3+
// See https://github.com/pointfreeco/swift-snapshot-testing/discussions/901#discussioncomment-10605497
4+
// tl;dr: Swift Testing is not available when using UI tests.
5+
// And apparently `private import` - the preferred way to do this - doesn't work.
6+
// So we use a deprecated approach that does work with this.
7+
@_implementationOnly import Testing
48
#endif
59

610
public class NimbleSwiftTestingHandler: AssertionHandler {

0 commit comments

Comments
 (0)