swift-snapshot-testing icon indicating copy to clipboard operation
swift-snapshot-testing copied to clipboard

Add option to disable counter suffixes

Open dafurman opened this issue 3 years ago • 1 comments

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

dafurman avatar Jul 07 '21 01:07 dafurman

@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.

dafurman avatar May 01 '22 00:05 dafurman

@stephencelis +1 this would be nice. I thought this was an issue on our end at first.

Deco354 avatar Mar 21 '23 06:03 Deco354