Tweak to add ability of passing ErrorOptions
and pass cause to `Ind…
#228
Annotations
8 errors and 1 warning
src/parser/analyse/story/attributes.test.ts > getStringValueFromAttribute > throws error when a `<Story />` 'name' attribute value is not a string:
src/parser/analyse/story/attributes.test.ts#L37
Error: Snapshot `getStringValueFromAttribute > throws error when a `<Story />` 'name' attribute value is not a string 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0001 (AttributeNotStringError): In the stories file: <path not specified>
-
- A '<Story name="undefined" />' has a prop 'name' whose value must be a static literal string.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0001
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0001 (AttributeNotStringError)]
❯ src/parser/analyse/story/attributes.test.ts:37:8
|
src/parser/analyse/story/attributes.test.ts > getArrayOfStringsValueFromAttribute > throws error when a `<Story />` 'tags' attribute value is not an array expression:
src/parser/analyse/story/attributes.test.ts#L76
Error: Snapshot `getArrayOfStringsValueFromAttribute > throws error when a `<Story />` 'tags' attribute value is not an array expression 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0002 (AttributeNotArrayError): In the stories file: <path not specified>
-
- A '<Story name="Default" />' has a prop'tags' whose value was expected to be a static array.
- Instead the value type is '0'.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0002
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0002 (AttributeNotArrayError)]
❯ src/parser/analyse/story/attributes.test.ts:76:7
|
src/parser/analyse/story/attributes.test.ts > getArrayOfStringsValueFromAttribute > throws error when a `<Story />` 'tags' attribute value is not an array of strings only:
src/parser/analyse/story/attributes.test.ts#L116
Error: Snapshot `getArrayOfStringsValueFromAttribute > throws error when a `<Story />` 'tags' attribute value is not an array of strings only 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0003 (AttributeNotArrayOfStringsError): In the stories file: <path not specified>
-
- A '<Story name="Default" />' has attribute 'tags' whose value was expected to be an array expression.
- All elements in the array must be static literal strings only, but one of the elements is of type 'undefined'.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0003
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0003 (AttributeNotArrayOfStringsError)]
❯ src/parser/analyse/story/attributes.test.ts:116:7
|
src/parser/analyse/story/attributes/identifiers.test.ts > getStoryIdentifiers > throws when '<Story />' doesn't provide an 'exportName' or 'name' attribute prop:
src/parser/analyse/story/attributes/identifiers.test.ts#L93
Error: Snapshot `getStoryIdentifiers > throws when '<Story />' doesn't provide an 'exportName' or 'name' attribute prop 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0004 (NoStoryIdentifierError): Missing 'name' or 'exportName' attribute (prop) in a '<Story />' definition in the stories file: 'file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/invalid.stories.svelte'.
- All stories must either have a 'name' or an 'exportName' prop, or both.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0004
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0004 (NoStoryIdentifierError)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:93:7
|
src/parser/analyse/story/attributes/identifiers.test.ts > getStoryIdentifiers > throws when 'exportName' is not a valid JavaScript variable name:
src/parser/analyse/story/attributes/identifiers.test.ts#L217
Error: Snapshot `getStoryIdentifiers > throws when 'exportName' is not a valid JavaScript variable name 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0005 (InvalidStoryExportNameError): Invalid attribute 'exportName' value 'default' found in '<Story />' component inside stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/invalid.stories.svelte
-
- 'exportName' value must be a valid JavaScript variable name.
- It must start with a letter, $ or _, followed by letters, numbers, $ or _.
- Reserved words like 'default' are also not allowed (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words)
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0005
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0005 (InvalidStoryExportNameError)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:217:7
|
src/parser/analyse/story/attributes/identifiers.test.ts > getStoriesIdentifiers > throws on identical 'exportName' attributes:
src/parser/analyse/story/attributes/identifiers.test.ts#L289
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/duplicate-identifiers.stories.svelte
-
- First instance: <Story name={undefined} exportName="SomeExportName" ... />
- Second instance: <Story name={undefined} exportName="SomeExportName" ... />
-
- This can happen when 'exportName' is implicitly derived by 'name'.
- Complex names will be simplified to a PascalCased, valid JavaScript variable name,
- eg. 'Some story name!!' will be converted to 'SomeStoryName'.
- You can fix this collision by providing a unique 'exportName' prop with <Story exportName="SomeUniqueExportName" ... />.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:289:7
|
src/parser/analyse/story/attributes/identifiers.test.ts > getStoriesIdentifiers > throws on identical 'exportName' attributes when deriving from 'name' attributes:
src/parser/analyse/story/attributes/identifiers.test.ts#L325
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes when deriving from 'name' attributes 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/duplicate-identifiers.stories.svelte
-
- First instance: <Story name={undefined} exportName="SomeStoryName" ... />
- Second instance: <Story name="some story name!!!" exportName="SomeStoryName" ... />
-
- This can happen when 'exportName' is implicitly derived by 'name'.
- Complex names will be simplified to a PascalCased, valid JavaScript variable name,
- eg. 'Some story name!!' will be converted to 'SomeStoryName'.
- You can fix this collision by providing a unique 'exportName' prop with <Story exportName="SomeUniqueExportName" ... />.
-
- More info: https://github.com/storybookjs/addon-svelte-csf/blob/v4.1.2/ERRORS.md#SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006
- ]
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:325:7
|
Test
Process completed with exit code 1.
|
Test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|