- When writing Snapshot Tests that are intended to stick around, you need to be careful to write really solid test descriptions, because the body of the test no longer communicates anything about what’s important about the test case.
- During future runs, the test will compare the latest JSON with the snapshot file.
- Snapshot Testing in Jest was designed to make it easy to test React components, but it can be used for more than that.
- The ability to quickly update a snapshot when it changes makes for a nicer, faster workflow.
- It is definitely worth experimenting with Jest’s Snapshot Testing feature.
Snapshot Testing has been getting a fair bit of attention recently with some new tool support that makes it easy to use. But is that a good thing? …
Continue reading “Snapshot Testing: Use With Care”