Skip to content

Commit

Permalink
chore: add missing piece of puzzle about snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed Nov 14, 2024
1 parent bb1d1c6 commit 3ea5dd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/docs/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ Keep them:
- Then write your tests in Jest.
- Then we can capitalize on its snapshots feature to check that something stays the same during different runs.
- Of course if we change our implementation or initial data snapshots would break but that is a different story.
- And on a relate note, you need to check the generated snapshot first to see if the returned data makes sense to you.
- Just double checking, you're [committing your Jest snapshots](https://jestjs.io/docs/snapshot-testing#snapshot-testing-with-jest), right?

![meme about committing jest snapshots](./assets/commiting-snapshots.png)

- Reuse the same tool that we love to use in unit testing.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3ea5dd6

Please sign in to comment.