Skip to content

Commit

Permalink
feat: add shard option
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Jan 9, 2023
1 parent 725761b commit 69c53fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Usage: test-storybook [options]
| `--outputFile` | Write test results to a file when the --json option is also specified. <br/>`test-storybook --json --outputFile results.json` |
| `--junit` | Indicates that test information should be reported in a junit file. <br/>`test-storybook --**junit**` |
| `--ci` | Instead of the regular behavior of storing a new snapshot automatically, it will fail the test and require Jest to be run with `--updateSnapshot`. <br/>`test-storybook --ci` |
| `--shard [shardIndex/shardCount]` | Splits your test suite across different machines to run in CI. <br/>`test-storybook --shard=1/3` |

## Ejecting configuration

Expand Down
4 changes: 4 additions & 0 deletions src/util/getParsedCliOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export const getParsedCliOptions = () => {
.option(
'--ci',
'Instead of the regular behavior of storing a new snapshot automatically, it will fail the test and require to be run with --updateSnapshot.'
)
.option(
'--shard <shardIndex/shardCount>',
'Splits your test suite across different machines to run in CI.'
);

program.exitOverride();
Expand Down

0 comments on commit 69c53fa

Please sign in to comment.