-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
ReferenceError: window is not defined when executing initStoryshots() #909
Comments
@flanamacca which code references are you referring to? The https://github.com/storybooks/storybook/tree/master/packages/storyshots We are in the process of transitioning to a mono-repo to simplify version management and testing. |
Hey @shilman This part on that pge. import initStoryshots from 'storyshots'; When i do the basic installation with create-react-app and run it, it doesn't work either (since it's not configured to run through any preprocessor). PASS src/App.test.js
|
Found the solution is that unlike in some other jest setups, you need to define your windows as global objects in the config file. |
Sorry for coming back to a closed issue, but I'm also experiencing this. @flanamacca , do you happen to have a code sample that shows your solution? |
This error started happening for me all of a sudden out of nowhere :| |
` ReferenceError: error is not defined
` |
When using jest to init initStoryshots (as per the guide), I am stumped with the following error. Sadly all of the code references that used to exist for storyshots seem to go to 404 pages.
` FAIL .\Storyshots.test.js
● Test suite failed to run
The text was updated successfully, but these errors were encountered: