From 2fb5ed55c7136623f53b66de467560d6519b47b1 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 18 Apr 2024 12:41:20 +0200 Subject: [PATCH] update snapshots --- .../src/errors/preview-errors.test.ts | 21 ++++++++++++++----- .../core-events/src/errors/preview-errors.ts | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/code/lib/core-events/src/errors/preview-errors.test.ts b/code/lib/core-events/src/errors/preview-errors.test.ts index 398646c4a624..fec373b143ee 100644 --- a/code/lib/core-events/src/errors/preview-errors.test.ts +++ b/code/lib/core-events/src/errors/preview-errors.test.ts @@ -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 + " + `); }); }); diff --git a/code/lib/core-events/src/errors/preview-errors.ts b/code/lib/core-events/src/errors/preview-errors.ts index 09b5224d0322..1f30378a3bca 100644 --- a/code/lib/core-events/src/errors/preview-errors.ts +++ b/code/lib/core-events/src/errors/preview-errors.ts @@ -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.`;