I am trying to incorporate storyshots in my project. I have this jest config:
"moduleFileExtensions": [
"json",
"js",
"jsx"
],
Here is my test file content:
import React from 'react';
import renderer from 'react-test-renderer';
import initStoryshots from '@storybook/addon-storyshots';
import IconCell from './';
initStoryshots({
framework: 'react'
});
test('iconcell', () => {
expect(renderer.create(<IconCell size="normal" type="pause" />).toJSON()).toMatchSnapshot();
});
But it throws error:
Cannot find module '@storybook/react' from 'index.js'
The error thrown in node_modules/jest-resolve/build/index.js
@storybook/react
npm module@kadira
namespace, but version 3 has a @storybook
one. There might be a clash of incompatible base and addon.