-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Description
@testing-library/jest-domversion: ^6.0.1nodeversion: v18.16.1npm(oryarn) version: yarn 1.22.19
Relevant code or config:
// jest.config.js
import '@testing-library/jest-dom/extend-expect';What you did:
Trying to run a test in next js
What happened: It returns an cannot find module error even though the library is in the package.json under dev dependencies
"Cannot find module '@testing-library/jest-dom/extend-expect' from 'jest.setup.js'"
Reproduction:
Problem description:
Tried to run npm test with next js but returns a cannot find module with jest-dom using the latest version(6.0.1).
If you try to hover then click the imported library vs code will typically route you the the file, but in this case it seems like vs code cant find the js-dome library.
@testing-library/jest-domis already existing in package json dev dependency.- Already tried deleting node_modules and lock file but error still there.
I tried switching to older version like 5.6 and the error is gone.
Cannot proceed on running the test.
Suggested solution:
Metadata
Metadata
Assignees
Labels
No labels