-
-
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
TypeError: Cannot read property 'firstChild' of undefined when using import (ES6 via Babel) #297
Comments
It could be unrelated but I get the same error when adding new tests. The problem was introduced in this React commit: facebook/react@a194e51 It acts like we are hitting some kind of limit. Any added test causes the "Cannot read property 'firstChild' of undefined" error and it doesn't have to test react components. Using karma+jasmine (not jest), babel, browserify. No ES6 modules. |
I bumped into this issue too yet without using ES6 or babel. The |
@tom76kimo can you test if this problem was introduced with facebook/react@a194e51 ? |
Fixed by going to jasmine 1.3 from 2.2. |
@nifgraup did you downgrade jasmine from 2.2 to 1.3? |
Yes, that did the trick for some reason. |
Back to Jasmine 2.x. Things seem to behave better when I unmount components after each test. |
Fixed in #741 for 0.9.0. |
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. |
I want to move my code from
require
to the official ES6import
syntax:Unfortunately this gives me this error:
when I'm writing the test case oldschool style:
it passes. I assume it's the same issue like #186 but if I move the
import
inside theit(...)
or abeforeEach
I'll get a compile error:Does anyone have a workaround or a solution to this problem?
The text was updated successfully, but these errors were encountered: