codeforboston / codeforboston/cliff-effects
Replace snapshot tests with Enzyme tests
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
This definitely needs discussion, but personally, I have found snapshot tests to be generally useless at best; at my previous job, we started out using them extensively (almost exclusively), but we soon found that they didn't add value for our team; many PRs would contain large snapshot diffs and it was frequently difficult for coders/codecheckers to determine whether the changes were a problem or not. We tended to find ourselves briefly skimming the snapshot diffs or ignoring them. Snapshots also tend to not let you actually determine what exactly they're testing, so it doesn't help you know if your change has broken it.
In my experience, it's much more useful to write Enzyme tests that walk the component hierarchy and make specific assertions about the content.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing snapshot tests and reviewing how component tests are organized. Discuss and define the replacement scope before changing tests; done means the agreed snapshot coverage has been replaced with Enzyme tests containing specific assertions about component content and hierarchy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100