Open p-iknow opened 3 years ago
Possibly related: https://github.com/jsdom/jsdom/issues/2156
In my case using default transformIgnorePatterns
in jest config fixed the problem. Not sure how it's related, but maybe it will lead somone further.
The error appeared with transformIgnorePatterns
set to []
, but when I removed this property from jest config, the tests with @swc/jest
and @testing-library/react
worked just fine.
problem
When switching to swc/jest, the following error occurs when executing the test. It seems to be related to jsdom. I tried to figure out what the problem was, but I couldn't find a solution. Can I get help solving this problem?
jest-setting
The jest setting is as follows.
The test I executed
I'm using next.js and I'm doing the test below using react-testing-lib.