-
-
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: environment.dispose is not a function #5401
Comments
Fix: installed jest globally rather than running from local npm script. |
Just ran into the same issue. Upgraded jest and the error went away. |
|
Updating Jest didn't fix this for me.
But this did 🙌 |
I also had to uninstall jest first, I'm using create-react-app. |
If you are using create-react-app then
to see which of your dependencies is causing it. In my case it was caused by upgrade of lint-staged to v 7.0.0. (lint-staged/lint-staged#414) |
I got this using create-react-app after installing |
It is not supported to "upgrade Jest" inside a CRA-managed project. If you have both |
I filed a new issue for this problem. I think it's a Jest bug (that hasn't been fixed yet). #5913 |
@AndreiCalazans @jonathan-stone Please, could you report such issues to CRA in the future? We had no idea people were doing workarounds like installing Jest into a CRA project (which is entirely unsupported and will break your projects later). If something doesn't work in CRA out of the box, it's CRA's fault, and we want to be aware of it so we can fix it for our users. Thanks! |
I published https://github.com/facebook/create-react-app/releases/tag/v1.1.3 |
I have the same problem, because I run ui tests with different config ( |
I fixed this problem by updating jest. |
Ya, this works for me. |
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. |
What is the current behavior?
All tests files fail with the following error:
Tests were running yesterday.
Removing node_modules & reinstalling produced no difference.
Dependencies:
"jest": "^22.1.4",
with presets:
"jest-expo": "^25.0.0"
The text was updated successfully, but these errors were encountered: