-
Notifications
You must be signed in to change notification settings - Fork 36
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
Report which snapshots are unused #465
Comments
Thank you for opening the feature request! Perhaps Feel free to put up a PR. This is the code you'll need to modify, the "lines" of the SnapshotReport: https://github.com/tophat/syrupy/blob/818d405a85c2f1f5db9d673e632677c10cb52ad9/src/syrupy/report.py#L223. Currently we print If you have any questions, you can always post in this issue, or join us on our discord: https://discord.gg/YhK3GFcZrk |
🎉 This issue has been resolved in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Is your feature request related to a problem? Please describe.
In test suites that are very long, it can be tedious and frustrating to try to find which snapshots are stale/unused after eg many tests are changed. The current report lists how many snapshots were unused, but not which ones.
Describe the solution you'd like
I would like an optional flag that, when provided, will include the locations & names of unused snapshots in the final report.
Describe alternatives you've considered
I don't think there's a great alternative. Usually to find out which snapshots have become obsolete, I have to provide the
--snapshot-update
option and look at the generated diff. When syrupy is running as a CI step, this means I have to rerun the test suite locally, which can be very time consuming.Additional context
I would be happy to make a PR to address this issue.
The text was updated successfully, but these errors were encountered: