-
Notifications
You must be signed in to change notification settings - Fork 2.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
Support Jest 27 #5771
Comments
I can across this error:
Based on what you pointed out in your links, I added Just in case anyone else runs across this. It will probably need to be added as a default value. Update 1So, it works when I run tests locally. Meaning, if I go into my component lib and run I guess from the root of the project, it still isn't working. Update 2I made sure my
Clearly, there is something new with Babel and Jest 27 that will have to be resolved in relation to typescript. |
Yep, I saw this too the other day in a non-nx project. I think the I the Jest blog post linked up top,
|
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
@Brian-McBride's answer above solves it for all of my react libs, but none of my nextjs apps seem to work (with or without jsdom). I am fairly certain it has to do with the nrwl react plugin with this line |
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: nrwl#5771
- Sets default testEnvironment to web - Updates node generators to specify testEnvironment: node - Provides migrations to update existing jest.config.js files - Bump angular-preset-jest to latest ISSUES CLOSED: #5771
I'm adding another thing I ran across. Make sure you set your |
While changing 'babel-jest' to 'ts-jest' , i got an error. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Description
Jest 27 has just released and it only supports Node.js LTS and v15.
https://jestjs.io/blog/2021/05/25/jest-27
https://github.com/facebook/jest/releases/tag/v27.0.0
Motivation
We can use the latest version of Jest.
Suggested Implementation
A migration for
"testEnvironment": "jsdom"
may be needed.Alternate Implementations
The text was updated successfully, but these errors were encountered: