Open remarkablemark opened 4 hours ago
What versions of Node, jest, and jsdom are you using? It sounds like you have something out of date.
I'm using:
Dependency | Version |
---|---|
Node.js | 20.18.0 |
Jest | 29.7.0 |
jsdom | 20.0.3 |
Let me try upgrading Node.js from 20 to 22
Update 1: upgrading Node.js didn't fix it, but I noticed that jsdom
is currently v25 so let me try to update that in my project
Update 2: I tried upgrading jest-environment-jsdom
from 29.7.0
to 30.0.0-alpha.6
but it still failed locally for me. I can confirm the jsdom
version did go up:
$ npm ls jsdom
└─┬ jest-environment-jsdom@30.0.0-alpha.6
├─┬ @jest/environment-jsdom-abstract@30.0.0-alpha.6
│ └── jsdom@25.0.1
└── jsdom@22.1.0
Update 3: I set package.json overrides
to ensure jsdom
is 25 but tests still failed locally
What version of React Router are you using?
7.0.1
Steps to Reproduce
https://github.com/remarkablemark/mui-template/pull/1082
I tried replacing
react-router-dom
withreact-router
but got the same errorExpected Behavior
Jest tests pass with latest
react-router
versionActual Behavior
Jest tests failing with error: