Skip to content

Commit 66c6e3b

Browse files
committed
add tags story that ensures !test tag is respected
1 parent 19bbf92 commit 66c6e3b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tests/stories/Tags.stories.svelte

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,23 @@
1111
parameters: {
1212
controls: { disable: true },
1313
},
14-
tags: ['!dev', '!autodocs', '!test'],
14+
tags: ['custom-tag'],
1515
});
1616
</script>
1717

1818
<Story name="With Autodocs" tags={['autodocs']}>With autodocs</Story>
1919

20-
<Story name="With Dev" tags={['dev']}>With dev</Story>
20+
<Story name="Without Dev" tags={['!dev', 'autodocs']}>Without dev</Story>
2121

22-
<Story name="With Test" tags={['test']}>With test</Story>
22+
<Story
23+
name="Without Test"
24+
tags={['!test']}
25+
play={() => {
26+
throw new Error('This error is on purpose');
27+
}}
28+
>
29+
This story fails interaction testing, but should not run in Vitest because it has the
30+
<code>"!test"</code> tag.
31+
</Story>
2332

24-
<Story name="No Tags">No tags</Story>
33+
<Story name="No story-level tags">No story-level tags</Story>

0 commit comments

Comments
 (0)