Add guidelines about when and how to use snapshot tests effectively
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- documentation, testing
Research direction
Start with docs/testing/unit-testing.md and its existing Snapshots section. Review the linked references for useful principles, then expand the documentation with guidance on when snapshots are appropriate and how to keep them understandable and effective. Done means the section clearly addresses both appropriate use and common misuse.
Written by the indexing model from the issue text.
Description
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:
- Dominant language
- JavaScript
- Stars
- 86
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/contributor-docs
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
MetaMask/contributor-docs#164 ·
-
issue Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
MetaMask/contributor-docs#169 ·
-
team-core-platform
Difficulty 4/5 3-5 days Newbie friendliness 45/100
MetaMask/contributor-docs#157 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
MetaMask/contributor-docs#142 ·
-
category-documentation github-migration-triaged team-wallet-framework wf-documentation
MetaMask/contributor-docs#122 · 3 comments · 1 assignee ·
All issues in MetaMask/contributor-docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·