Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Apr 18, 2024
1 parent 7e120a8 commit 2fb5ed5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
21 changes: 16 additions & 5 deletions code/lib/core-events/src/errors/preview-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,22 @@ describe('UnknownFlowArgTypesError', () => {
raw: "SomeType['someProperty']",
};

const message = `"There was a failure when generating ArgTypes in Typescript for {"name":"signature","raw":"SomeType['someProperty']"}
This type is either not supported or it is a bug in Storybook.
If you think this is a bug, please open an issue in Github."`;

const typeError = new UnknownArgTypesError({ type, language: 'Typescript' });
expect(typeError.message).toMatchInlineSnapshot(message);
expect(typeError.message).toMatchInlineSnapshot(`
"There was a failure when generating detailed ArgTypes in Typescript for:
{
"name": "signature",
"raw": "SomeType['someProperty']"
}
Storybook will fall back to use a generic type description instead.
This type is either not supported or it is a bug in the docgen generation in Storybook.
If you think this is a bug, please detail it as much as possible in the Github issue.
More info: https://github.com/storybookjs/storybook/issues/26606
"
`);
});
});
2 changes: 1 addition & 1 deletion code/lib/core-events/src/errors/preview-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class UnknownArgTypesError extends StorybookError {
${JSON.stringify(this.data.type, null, 2)}
so Storybook will fall back to a generic type description.
Storybook will fall back to use a generic type description instead.
This type is either not supported or it is a bug in the docgen generation in Storybook.
If you think this is a bug, please detail it as much as possible in the Github issue.`;
Expand Down

0 comments on commit 2fb5ed5

Please sign in to comment.