Skip to content

Commit

Permalink
Fix build error when using UI Tests (Quick#1164)
Browse files Browse the repository at this point in the history
Thanks PointFree for documenting a fix.
  • Loading branch information
younata authored and noamfreeman committed Oct 14, 2024
1 parent 5a2c27b commit 654941c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Foundation
#if canImport(Testing)
import Testing
// See https://github.com/pointfreeco/swift-snapshot-testing/discussions/901#discussioncomment-10605497
// tl;dr: Swift Testing is not available when using UI tests.
// And apparently `private import` - the preferred way to do this - doesn't work.
// So we use a deprecated approach that does work with this.
@_implementationOnly import Testing
#endif

public class NimbleSwiftTestingHandler: AssertionHandler {
Expand Down

0 comments on commit 654941c

Please sign in to comment.