Skip to content

Commit

Permalink
Merge pull request #52 from storybookjs/feat/add-update-snapshot-cli-…
Browse files Browse the repository at this point in the history
…option

feat: add update snapshot command to cli
  • Loading branch information
shilman committed Feb 15, 2022
2 parents ab46d8c + ec4fcc0 commit e13b424
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Usage: test-storybook [options]
| `--no-cache` | Disable the cache <br/>`test-storybook --no-cache` |
| `--clearCache` | Deletes the Jest cache directory and then exits without running tests <br/>`test-storybook --clearCache` |
| `--verbose` | Display individual test results with the test suite hierarchy <br/>`test-storybook --verbose` |
| `-u`, `--updateSnapshot` | Use this flag to re-record every snapshot that fails during this test run <br/>`test-storybook -u` |

## Configuration

Expand Down
6 changes: 5 additions & 1 deletion src/util/getParsedCliOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export const getParsedCliOptions = () => {
)
.option('--no-cache', 'Disable the cache')
.option('--clearCache', 'Deletes the Jest cache directory and then exits without running tests')
.option('--verbose', 'Display individual test results with the test suite hierarchy');
.option('--verbose', 'Display individual test results with the test suite hierarchy')
.option(
'-u, --updateSnapshot',
'Use this flag to re-record every snapshot that fails during this test run'
);

program.exitOverride();

Expand Down

0 comments on commit e13b424

Please sign in to comment.