Skip to content
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

Add guidelines about when and how to use snapshot tests effectively #115

Open
Gudahtt opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Nov 7, 2024

Snapshot tests are often "misused" to create hard-to-understand and brittle tests that are not effective at catching bugs. They can be useful in narrow situations though.

We should write guidance about when and how to effectively use snapshot tests.

There is some mention of snapshot testing here already: https://github.com/MetaMask/contributor-docs/blob/main/docs/testing/unit-testing.md#snapshots
But it doesn't provide enough guidance yet.

References for inspiration:

@Gudahtt Gudahtt changed the title Add guidelines about what snapshot tests should be used for Add guidelines about when and how to use snapshot tests effectively Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants