-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Refactor tests that rely only on saved snapshots #11149
Comments
Sound good. 👍 |
I think we're good to start refactoring now we've identified the tests that rely on a single snapshot? I've labeled this |
I'm not sure you need to move 100% of them to explicit asserts. I think inline snapshots are much less likely to get "accidentally" broken than non-inline ones, so I think in some cases they would be good enough and quicker to migrate to. We should reserve snapshots only for big results. |
🎉 This issue has been resolved in version 31.15.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What would you like Renovate to be able to do?
It's easy to maintain incorrect behavior for pretty long periods, once snapshot is (re)written with bad data.
Snapshots are good when we have other assertions focused on particular aspects.
Otherwise, they may be abused as an easy way to escape mental effort required for writing better tests.
Did you already have any implementation ideas?
Identify and refactor such tests in small batches.
The text was updated successfully, but these errors were encountered: