Closed alamenai closed 1 month ago
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
.
An example from index.js
:
...
require('lodash/isEqualWith.js');
require('css.escape');
require('lodash/isEqualWith');
...
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:
My compatriot figured out the quick solution is to use the latest jest-dom
.
npm i -D -w=packages/client @testing-library/jest-dom@latest
This has been resolved in https://github.com/testing-library/jest-dom/pull/642 :)
@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: