-
Notifications
You must be signed in to change notification settings - Fork 408
Upgrade to v28 complains "Cannot find module '@jest/expect'" #457
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
Comments
Having same issue in non-react app |
Same here in a react app |
I had the same issue. Do you have a jest.config.js? This is was fixed it for me. I removed module.exports = {
preset: 'ts-jest', // use js-jest if you re not using typescript
testEnvironment: 'node',
resolver: 'jest-node-exports-resolver',
} to: module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transformIgnorePatterns: ['^.+\\.js$'],
} Can you try? |
@areindl I did the same, fixed the issue +1 |
You might not need this |
@testing-library/react
version: 13.2.0Relevant code or config:
jest.setup.js:
jest.config.js:
What you did:
yarn add jest@latest ts-jest@latest -D
yarn add @testing-library/dom -D
yarn add jest-environment-jsdom -D
yarn test Stack
What happened:
Before I upgraded my tests were passing. Now they all fail
The text was updated successfully, but these errors were encountered: