swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Add option to disable counter suffixes
This addresses the issue here: https://github.com/pointfreeco/swift-snapshot-testing/issues/429
This allows users to disable the default behavior of snapshot creation, where a counter is added whenever a test doesn't specify a test name.
For tests that only validate one snapshot, adding a suffix to these tests seems excessive. For me, this would result in most test files looking like MyViewControllerSnapshotTests/testLayout.1.png
and it would be nice to be able to disable this functionality when it's not desired to keep file names simpler: MyViewControllerSnapshotTests/testLayout.png
@stephencelis Just checking in on this to see if there's any action you'd need from me here for this PR to be accepted. Ultimately, this would help devs with a workflow like my own where there's only one snapshot per test function, with no need for suffixing being added to file names.
@stephencelis +1 this would be nice. I thought this was an issue on our end at first.