Skip to content

Commit

Permalink
Upgrade Jest to v28 (#169)
Browse files Browse the repository at this point in the history
This PR upgrades Jest from v27 to v28. Most of the breaking changes don't affect us, except for two:
- To use the JSDOM test environment, `jest-environment-jsdom` now has to be installed separately
- Jest now has full support for package exports, which can cause problems where file imports are not resolved correctly. Specifically, this is a problem for `uuid`. There is a discussion and proposed solution in this [GitHub issue](microsoft/accessibility-insights-web#5421 (comment)), which I used in this PR. To summarize, the fix is to add a custom resolver that forces Jest to use the CommonJS+node version of `uuid`, but leaves all other resolutions the same

J=SLAP-2123
TEST=auto

See that Jest tests pass.
  • Loading branch information
nmanu1 committed Jun 7, 2022
1 parent 02aa26b commit 20dd074
Show file tree
Hide file tree
Showing 3 changed files with 13,807 additions and 8,702 deletions.
Loading

0 comments on commit 20dd074

Please sign in to comment.