Skip to content

Commit 7edc4f2

Browse files
authored
Merge pull request storybookjs#396 from storybookjs/skip-tags
Clarify difference between skipped and excluded tags
2 parents b6dc95f + 77751c3 commit 7edc4f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Usage: test-storybook [options]
165165
| `--failOnConsole` | Makes tests fail on browser console errors<br/>`test-storybook --failOnConsole` |
166166
| `--includeTags` | (experimental) Only test stories that match the specified tags, comma separated<br/>`test-storybook --includeTags="test-only"` |
167167
| `--excludeTags` | (experimental) Do not test stories that match the specified tags, comma separated<br/>`test-storybook --excludeTags="broken-story,todo"` |
168-
| `--skipTags` | (experimental) Skip test stories that match the specified tags, comma separated<br/>`test-storybook --skipTags="design"` |
168+
| `--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"` |
169169

170170
## Ejecting configuration
171171

@@ -240,6 +240,8 @@ export const Secondary = {
240240
241241
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.
242242

243+
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.
244+
243245
## Test reporters
244246

245247
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.

0 commit comments

Comments
 (0)