Skip to content

Commit 74f8b54

Browse files
Update to test:dom-snapshot:update (#2939)
1 parent 37d6906 commit 74f8b54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Testing is done using Mocha, Jest, and Storybook. Roughly speaking: Jest tests D
1919
* Browse to [http://localhost:8001](http://localhost:8001)
2020
* Run snapshot tests with `npm run test:snapshot` or, for just a specific file:
2121
`npm run test:snapshot components/button/`.
22-
* The entire test suite may take up to 10 minutes to run. To update Jest snapshots for a single component, use `npm run test:snapshot:update -- -t=popover` where the test name contains `popover`.
22+
* The entire test suite may take up to 10 minutes to run. To update Jest DOM snapshots for a single component, use `npm run test:dom-snapshot:update -- -t=popover` where the test name contains `popover`.
2323

2424
### React Storybook
2525

@@ -40,7 +40,7 @@ There are two parts to code linting: style and quality. [Prettier](https://prett
4040

4141
Story-based tests use [Jest](https://facebook.github.io/jest/), [React Storybook](https://storybook.js.org/), and [Storyshots](https://github.com/storybooks/storybook/tree/master/addons/storyshots) to automatically create DOM and image snapshots of each story example. Snapshot testing uses the Jest framework to take a snapshot of the state of the DOM when the component is rendered and save it as a string for future comparison. StoryShots utilizes Jest Image Snapshot to test the visual rendering of pages against previously correct versions for visual regression testing. These tests are run without a DOM. Most props that don't involve the user can be tested here.
4242

43-
To create tests automatically, import examples in `/components/storybook-stories.js` into `/components/story-based-tests.js` also. Then, run `npm run test:snapshot`. Markup and image snapshots will be generated for each Storybook story. To update existing snapshots, please use `npm run test:snapshot:update`.
43+
To create tests automatically, import examples in `/components/storybook-stories.js` into `/components/story-based-tests.js` also. Then, run `npm run test:snapshot`. Markup and image snapshots will be generated for each Storybook story. To update existing DOM snapshots, please use `npm run test:dom-snapshot:update`.
4444

4545
Use Jest to test the presence of:
4646

0 commit comments

Comments
 (0)