pointfreeco / swift-snapshot-testing

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

Allow clients to disable auto record feature #891

Closed Muhieddine-El-Kaissi closed 1 month ago

mbrandonw commented 1 month ago

Hi @Muhieddine-El-Kaissi, you have opened and closed two similar PRs just now, but I wanted to let you know that this feature is already supported as of version 1.17. You can see the docs here.

Muhieddine-El-Kaissi commented 1 month ago

Hi @mbrandonw, thanks for pointing it out!. We had a fork for it. I will set record to none. is there a way to make this selection global. I do see SnapshotTestingConfiguration but not sure how to set it up

mbrandonw commented 1 month ago

Yes, the migration guide shows how to do this:

https://swiftpackageindex.com/pointfreeco/swift-snapshot-testing/main/documentation/snapshottesting/migratingto1.17

In particular, the part where invokeTest is wrapped in withSnapshotTesting.