-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running test repeatedly results in duplicate snapshot being created. #577
Comments
A workaround is to set the |
@simondelphia @Deco354 |
@stephencelis Can we reopen this? Using the named parameter is a work-around rather than a fix. It won't be immediately obvious to anyone other than those within this thread. |
Sorry I must have skimmed this thread and missed #585 completely. |
Describe the bug
Running a snapshot test repeatedly with xcode's new 'run test repeatedly' functionality results in additional snapshots being created for that test.
We've a wrapper around this library which I've posted below although the identifier we're passing in to the testName does not include the iteration number at the real testSnapshot callsite.
To Reproduce
Take any snapshot test right click on it and run "test repeatedly". At a certain iteration a number matching this iteration (2 in the screenshots below) will be appended to the snapshot reference image name causing an additional snapshot to be saved and the tests to fail.
Expected behavior
I'd expect the test to use only one snapshot no matter how many time they're run.
Environment
The text was updated successfully, but these errors were encountered: