CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
Fixing snapshot testing fatigue

Fixing snapshot testing fatigue

Tyler Adams's avatar
Tyler Adams
Dec 15, 2020
∙ Paid

Share this post

CodeFaster
CodeFaster
Fixing snapshot testing fatigue
Share

This is part of a series on Wicked Fast Testing, a testing style that represents tests as JSON data. Check out Part 1 for a quick introduction.

Snapshot testing as used in the Jest testing framework and Wicked Fast Testing can really speed our coding, but has a curse: snapshot fatigue. In this post, we’ll dig into snapshot testing, snapshot testing fatigue, and how you can use Wicked Fast Testing, but not Jest, to solve this problem.

Snapshot Testing

Snapshot testing involves capturing the output, say of a UI component, and persisting it. Then future tests are tested against this persisted output. The real advantage of snapshot testing is that the snapshots can be updated by the computer. Imagine changing a small UI component and breaking 100 tests. Without snapshot tests, a human slowly and manually updates each test. With snapshot tests, a computer rapidly and automatically updates each test.

In the Jest testing framework, we can update the snapshots with:

jest -u

In Wicked Fast Testing, …

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share