-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Jest ignores obsolete file snapshots if there are inline snapshots #6655
Comments
Thanks for reporting! This is a great point, I'm also able to reproduce. I agree that it should mark the snapshot file as obsolete if it is not used anymore. |
/cc @azz |
Huh, I thought I tested that scenario, will be good to add an integration test for it once fixed. |
I've never used Thanks, |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
π Bug Report
Jest ignores obsolete file snapshots if there are inline snapshots in this test.
To Reproduce
Steps to reproduce the behavior:
Change the above test to use inline snapshots:
Now both a file and an inline snapshots exists. The file snapshot is completely ignored, Jest doesn't report that it's obsolete and doesn't remove it with
jest -u
.Expected behavior
Jest should fail on obsolete snapshots and remove them with
jest -u
.The text was updated successfully, but these errors were encountered: