Skip to content

Commit

Permalink
Added new update-snapshots command to makefile. Updated docs accordin…
Browse files Browse the repository at this point in the history
…gly.
  • Loading branch information
Dan Searle committed Sep 14, 2018
1 parent f6a3921 commit 71b3550
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ build:

test:
npm run test

update-snapshots:
npm run jest -- --updateSnapshot
2 changes: 1 addition & 1 deletion tools/x-docs/src/docs/guides/components/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ git commit -m "create snapshots for new story foo"
If you make a change to a component that means its snapshots are out of date, you'll need to regenerate the snapshots. Run:

```bash
npm test -- --updateSnapshot
make update-snapshots
```

and review the changes to the file `__tests__/__snapshots__/snapshots.test.js.snap`. Make sure the only changes are those you expected! When you're satisfied the snapshots are up to date, commit the file.
Expand Down

0 comments on commit 71b3550

Please sign in to comment.