From a42250f24df2e41aead99f4f43c04675891b1550 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 13 Aug 2018 10:23:07 +1000 Subject: [PATCH] Also skip stories on Chromatic We would probably need to render these stories inside the manager UI for this to make sense in Chromatic (which detects errors) --- examples/official-storybook/stories/core.stories.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/official-storybook/stories/core.stories.js b/examples/official-storybook/stories/core.stories.js index 4b372a00f0c3..35088648b742 100644 --- a/examples/official-storybook/stories/core.stories.js +++ b/examples/official-storybook/stories/core.stories.js @@ -35,7 +35,12 @@ storiesOf('Core|Events', module).add('Force re-render', () => ( // Skip these stories in storyshots, they will throw -- NOTE: would rather do this // via a params API, see https://github.com/storybooks/storybook/pull/3967#issuecomment-411616023 -if (navigator && navigator.userAgent && !(navigator.userAgent.indexOf('jsdom') > -1)) { +if ( + navigator && + navigator.userAgent && + !(navigator.userAgent.indexOf('jsdom') > -1) && + !(navigator.userAgent.indexOf('Chromatic') > -1) +) { storiesOf('Core|Errors', module) .add('story throws exception', () => { throw new Error('error');