pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.68k stars 556 forks source link

Beta support for Swift Testing, and other improvements. #867

Closed mbrandonw closed 1 week ago

mbrandonw commented 1 week ago

Opening this as a draft so that we can polish it up a bit more.

This PR brings beta support for Swift Testing, and greatly improves the two main customization points for snapshot testing: diffTool and isRecording. One can now fully customize how the diffTool produces a command for two file URLs, and isRecording has been turned into an enum with a 3rd option for never recording snapshots (useful for CI) and a forth option for recording only snapshots that fail (useful for strategies that use precision).

Resolves #840, #668, #508, #768, #862, #780, #531, #519