Too Long; Didn't Read
The gist of snapshot testing is asserting that a set of data hasn’t changed compared to a previous version, which is a <em>snapshot</em> of the data, to prevent regressions. The difference between a classic <code class="markup--code markup--p-code">assertEquals</code> and an <code class="markup--code markup--p-code">assertMatchesSnapshot</code> is that you don't write the expectation yourself when snapshot testing. When a snapshot assertion happens for the first time, it creates a snapshot file with the actual output, and marks the test as incomplete. Every subsequent run will compare the output with the existing snapshot file to check for regressions.