Skip to content

Add option to disable counter suffixes #486

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed

Add option to disable counter suffixes #486

wants to merge 1 commit into from

Conversation

dafurman
Copy link

@dafurman dafurman commented Jul 7, 2021

This addresses the issue here: #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 dafurman marked this pull request as ready for review July 7, 2021 01:13
@dafurman dafurman changed the title Added a global var that allows users to disable the counter suffix in… Add option to disable counter suffixes Jul 7, 2021
@dafurman
Copy link
Author

dafurman commented May 1, 2022

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

@Deco354
Copy link

Deco354 commented Mar 21, 2023

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

@dafurman dafurman closed this by deleting the head repository Jul 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants