-
Notifications
You must be signed in to change notification settings - Fork 23
How do I use jest.mock ? #38
Comments
storyshots does not have jest's mocking abilities. But it might work without the mock. Did you get an error while running storyshots? Could you show the error if so? |
sure, i posted the issue at the Material-UI repo w/ the error output after some research, it looks like there's a bug in React that prevents snapshot testing of components that rely on when i make a regular otherwise, apparently |
here's my
here's the error output for the
|
Thanks for the detailed information! I understand the problem now and have reproduced it myself. I can implement a permanent solution once react 15.4 is out with facebook/react#7649. Unfortunately, until then I am not sure what I can do about this :( It will be better to wait for 15.4 and do a good solution than doing something hacky right now. But I will look a bit into this. |
Is there progress on this? 15.4 is out now. |
I believe this has been fixed in v3.0, because it now uses Jest for snapshotting. |
Yep! |
Because of some strange jest behavior w/ material-ui, I have to mock a component to do a snapshot test:
jest.mock('material-ui/toggle')
How can I do this while using storyshot?
The text was updated successfully, but these errors were encountered: