You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several of the distribution files (in @testing-library/jest-dom/dist) are attempting to import lodash/isEqualWith. This is in addition to importing the correct file lodash/isEqualWidth.js.
In my project's node_modules/@testing-library, this occurs in index.js, index.mjs, matchers.mjs, and matchers-12582698.mjs. By commenting out the broken require and import statements, I can eliminate the error and run my tests.
before the library owners fix this, this is what you can do:
open up your package.json file
locate any lines that start with @testing-library (I don't care to know which one is broken)
remove the caret (^) before the version number ==> this will prevent automatic minor version updates, assuming your test used to work, whatever version you had in there was a good version, stick to it
remove dist, node_modules
reinstall the dependencies
rebuild
run tests
In a month or two, put the carets back and see if it is still broken, automatic minor version update is a good thing to have in most cases, if it is still broken, curse the library owner and go back to step 1.
@testing-library/react
version: ^16.0.1Vitest config
What you did:
Everything was working well and without updating the dependencies, I started seeing this error.
What happened:
Reproduction:
npm run test
where test a script in the package json :Problem description:
It seems an internal issue with the package itself
Suggested solution:
The text was updated successfully, but these errors were encountered: