Skip to content

Commit

Permalink
Merge pull request #396 from storybookjs/skip-tags
Browse files Browse the repository at this point in the history
Clarify difference between skipped and excluded tags
  • Loading branch information
yannbf authored Nov 17, 2023
2 parents b6dc95f + 77751c3 commit 7edc4f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Usage: test-storybook [options]
| `--failOnConsole` | Makes tests fail on browser console errors<br/>`test-storybook --failOnConsole` |
| `--includeTags` | (experimental) Only test stories that match the specified tags, comma separated<br/>`test-storybook --includeTags="test-only"` |
| `--excludeTags` | (experimental) Do not test stories that match the specified tags, comma separated<br/>`test-storybook --excludeTags="broken-story,todo"` |
| `--skipTags` | (experimental) Skip test stories that match the specified tags, comma separated<br/>`test-storybook --skipTags="design"` |
| `--skipTags` | (experimental) Do not test stories that match the specified tags and mark them as skipped in the CLI output, comma separated<br/>`test-storybook --skipTags="design"` |

## Ejecting configuration

Expand Down Expand Up @@ -240,6 +240,8 @@ export const Secondary = {
Once your stories have your own custom tags, you can filter them via the [tags property](#tags-experimental) in your test-runner configuration file. You can also use the CLI flags `--includeTags`, `--excludeTags` or `--skipTags` for the same purpose. The CLI flags will take precedence over the tags in the test-runner config, therefore overriding them.

Both `--skipTags` and `--excludeTags` will prevent a story from being tested. The difference is that skipped tests will appear as "skipped" in the cli output, whereas excluded tests will not appear at all. Skipped tests can be useful to indicate tests that are temporarily disabled.

## Test reporters

The test runner uses default Jest reporters, but you can add additional reporters by ejecting the configuration as explained above and overriding (or merging with) the `reporters` property.
Expand Down

0 comments on commit 7edc4f2

Please sign in to comment.