This project demonstrates a minimal reproduction of a bug currently in swift-snapshot-testing where repeat running of a test written with Swift Testing is unable to accomodate repeat running.
- Run
xcodebuild -scheme SwiftSnapshotTestingRepeatRunningBug -destination "platform=macOS" test | xcbeautify - Observe success
- Run
xcodebuild -scheme SwiftSnapshotTestingRepeatRunningBug -destination "platform=macOS" -test-iterations 10 test | xcbeautify - Observe failure on repeat runs
- Observe that snapshots are recorded to disk for each repeated iteration
- Delete those new snapshots
- Uncomment
File.counter.reset()insnapshotTest - Run the
xcodebuildcommand with iterations again - Observe success