Skip to content

Commit 521dc68

Browse files
authored
Add if !os(WASI) for SwiftWasm (#31)
1 parent 855b841 commit 521dc68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import Foundation
22

3+
#if !os(WASI)
34
public let _XCTIsTesting: Bool = {
45
ProcessInfo.processInfo.environment.keys.contains("XCTestSessionIdentifier")
56
|| ProcessInfo.processInfo.arguments.first
67
.flatMap(URL.init(fileURLWithPath:))
78
.map { $0.lastPathComponent == "xctest" || $0.pathExtension == "xctest" }
89
?? false
910
}()
11+
#endif

0 commit comments

Comments
 (0)