Improve errors related to parser/compiled
#75
Annotations
5 errors
src/parser/analyse/story/attributes/identifiers.test.ts#L92
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:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/invalid.stories.svelte'.
+ [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.]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:92:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L213
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:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/invalid.stories.svelte
+ [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' alue 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)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:213:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L282
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes 1` mismatched
- Expected
+ Received
@@ -1,6 +1,6 @@
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/duplicate-identifiers.stories.svelte
+ [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'.
❯ src/parser/analyse/story/attributes/identifiers.test.ts:282:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L315
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes when deriving from 'name' attributes 1` mismatched
- Expected
+ Received
@@ -1,6 +1,6 @@
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/duplicate-identifiers.stories.svelte
+ [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'.
❯ src/parser/analyse/story/attributes/identifiers.test.ts:315:7
|
|
This job failed
Loading