react-router
react-router copied to clipboard
chore: update to Jest v29
👋
I noticed you were on an old version when looking through the code, so I thought to update it.
Main changes are:
- Update RN, stop hoisting it and use own transformer
- Set default test env to
jsdom(changed default in Jest 27) - Map some
@remix-run/*modules to their CJS counterpart- This is due to Jest supporting
exports, and those modules always serving ESM when Jest providesbrowserandrequireconditions. See https://jestjs.io/docs/28.x/upgrading-to-jest28#packagejson-exports - This could probably be fixed by tweaking the
exportsin those modules, but I didn't look into it
- This is due to Jest supporting
- Update snapshots due to changed defaults: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
⚠️ No Changeset found
Latest commit: af34fb4508c704edfbd94c50ce5d939597766d0d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Hi @SimenB,
Welcome, and thank you for contributing to React Router!
Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.
You may review the CLA and sign it by adding your name to contributors.yml.
Once the CLA is signed, the CLA Signed label will be added to the pull request.
If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].
Thanks!
- The Remix team
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳
Hey team, any update on getting this merged? Jest 28+ doesn't appear to be compatible with Remix packages without addressing the package import issue mentioned above. Thanks!
I fixed the conflicts, but it looks like there's been enough updates since this PR to require more changes. Let me look into it...
@timdorr seems like snapshots are different since Jest 29 https://jestjs.io/blog/2022/08/25/jest-29 and need to be updated.
OK, now for the fun part: This was based on main, not the dev branch (which should be ahead code-wise and is where this should target). I got it fixed on main, so hopefully this is just resolving those conflicts. Fun! :S
Switching to #9895 because I can't push to this remote branch anymore. Not Simen's fault, just a GitHub thing.