From 11ff49912d7dd9c18e361a86cb7ce57c5e0b09ff Mon Sep 17 00:00:00 2001 From: Kotaro Sugawara Date: Fri, 20 Jul 2018 15:59:40 +0900 Subject: [PATCH] Fixed setupTests.js Fixed "info addon and storyshot seem to be incompatible" https://github.com/storybooks/storybook/issues/1011 --- src/setupTests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/setupTests.js b/src/setupTests.js index 82edfc9..b559c00 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -1,4 +1,10 @@ import { configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; +// https://github.com/storybooks/storybook/issues/1011 +jest.mock('@storybook/addon-info', () => ({ + withInfo: () => storyFn => storyFn, + setDefaults: () => {}, +})); + configure({ adapter: new Adapter() });