-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Tests crash when requiring React Addons #54
Comments
Issue loading React add ons: jestjs/jest#54
I got the same issue and fixed it by unmocking React. See http://facebook.github.io/jest/docs/tutorial-react.html#setup Can you tell me if it fixes it |
Fantastic — that works, thanks! Is it a bug to be fixed, or is it intentional (and should be documented)? |
This is intentional, React is not meant to be mocked when tested against. But we can definitively do a better job at failing when it's not the case. This error is very cryptic |
Yea, I've been tracking this confusing error message here: #14 This week and last have been super busy for me, so I haven't had a chance to dive in to it just yet, but I'll throw it to the top of the queue since I think it should be a fairly simple fix. If you have further questions or concerns, lets continue the thread in #14 to keep things centralized. |
Sounds good. I'd seen that issue earlier, but the title is misleading (in this case, there's nothing to do with module.exports). Maybe the scope/wording of #14 can be expanded? |
That's a good point -- I'll update the title |
I am seeing what appears to be the same issue in Jest V0.4, but I've added the
I'm just using the test files at the moment with the CheckboxWithLabel component, and it is seg faulting. I'm just following this example: https://facebook.github.io/jest/docs/tutorial-react.html#content node -v npm -v jest -v |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
npm test
throws "cannot read propertyref
of null" when my test requires React addonsRunning on OS X Mavericks
npm -v 1.4.9
node -v 0.10.28
Full stacktrace:
http://pastebin.com/aCgmYcuv
The text was updated successfully, but these errors were encountered: