Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storyshots is intended only to be used with storybook #1324

Closed
kurumkan opened this issue Jun 20, 2017 · 4 comments
Closed

Storyshots is intended only to be used with storybook #1324

kurumkan opened this issue Jun 20, 2017 · 4 comments

Comments

@kurumkan
Copy link

kurumkan commented Jun 20, 2017

Here is my test file code:

import React from 'react';
import { mount } from 'enzyme';
import renderer from 'react-test-renderer';
import initStoryshots from '@storybook/addon-storyshots';

import IconCell from './';
initStoryshots();
test('iconcell', () => {
    expect(renderer.create(<IconCell size="normal" type="pause" />).toJSON()).toMatchSnapshot();
});

jest configs has this:

"moduleFileExtensions": [
  "json",
  "js",
  "jsx"
],

but it throws:

 storyshots is intended only to be used with storybook 
  at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/index.js:106:11)
@ndelangen
Copy link
Member

Is @storybook/react a dependency listed in your package.json?

@kurumkan
Copy link
Author

Hi there, I followed the instructions from here
But the answer to your question - no, there is no such entry @storybook/react in my package json.

@tmeasday
Copy link
Member

Hey @kurumkan -- did something go wrong when you ran getstorybook? It should have added that entry for you.

Maybe storyshots' error message could be better here?

@ndelangen
Copy link
Member

Duplicate: #1323

I think both have been answered? Please let us know if you need further help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants