Commit 00517c1
chore: migrate Jest from v27 to v29 (#7894)
## Explanation
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:
* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
## References
<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?
For example:
* Fixes #12345
* Related to #67890
-->
## Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it upgrades core test runner dependencies and
changes transforms/environments, which can cause widespread CI failures
or subtle test behavior differences despite being mostly config/snapshot
churn.
>
> **Overview**
> Upgrades the monorepo’s test tooling from **Jest v27 to v29** (and
aligns `@types/jest`, `ts-jest`, and `jest-environment-jsdom` versions
across packages), removing now-unneeded Babel test plumbing (drops
`babel.config.js` and `babel-jest`).
>
> Updates Jest configuration to run TypeScript tests via **`ts-jest`**
(including scripts) and adds targeted `moduleNameMapper` fixes like
resolving `uuid` explicitly; also updates the custom JSDOM environment
to use the v29 `TestEnvironment` export.
>
> Regenerates/updates numerous inline snapshots and `.snap` files to
match Jest v29’s snapshot formatting output changes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9082f5a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Mark Stacey <markjstacey@gmail.com>1 parent 8d570c5 commit 00517c1
171 files changed
Lines changed: 3809 additions & 4139 deletions
File tree
- packages
- account-tree-controller
- src
- accounts-controller
- src
- address-book-controller
- src
- ai-controllers
- analytics-controller
- analytics-data-regulation-controller
- announcement-controller
- src
- app-metadata-controller
- src
- approval-controller
- src
- assets-controllers
- src
- DeFiPositionsController
- MultichainAssetsController
- MultichainAssetsRatesController
- MultichainBalancesController
- RatesController
- TokenSearchDiscoveryDataController
- token-prices-service
- assets-controller
- base-controller
- bridge-controller
- src
- __snapshots__
- utils
- __snapshots__
- metrics
- bridge-status-controller
- src
- __snapshots__
- utils
- build-utils
- chain-agnostic-permission
- src
- scope
- claims-controller
- composable-controller
- src
- connectivity-controller
- src
- controller-utils
- src
- core-backend
- delegation-controller
- src
- earn-controller
- src
- eip-5792-middleware
- src
- eip-7702-internal-rpc-middleware
- eip1193-permission-middleware
- src
- ens-controller
- src
- error-reporting-service
- eth-block-tracker
- eth-json-rpc-middleware
- src
- utils
- test
- eth-json-rpc-provider
- src
- foundryup
- gas-fee-controller
- src
- gator-permissions-controller
- src
- json-rpc-engine
- src
- v2
- json-rpc-middleware-stream
- keyring-controller
- src
- logging-controller
- src
- message-manager
- src
- messenger
- src
- multichain-account-service
- multichain-api-middleware
- src
- multichain-network-controller
- src/MultichainNetworkController
- multichain-transactions-controller
- src
- name-controller
- src
- network-controller
- tests
- network-enablement-controller
- notification-services-controller
- src
- NotificationServicesController
- NotificationServicesPushController
- permission-controller
- src
- permission-log-controller
- tests
- perps-controller
- src
- phishing-controller
- src
- polling-controller
- preferences-controller
- src
- profile-metrics-controller
- src
- profile-sync-controller
- src/controllers
- authentication
- user-storage
- ramps-controller
- src
- rate-limit-controller
- src
- remote-feature-flag-controller
- src
- sample-controllers
- src
- seedless-onboarding-controller
- src
- selected-network-controller
- tests
- shield-controller
- src
- signature-controller
- src
- storage-service
- subscription-controller
- src
- transaction-controller
- src
- transaction-pay-controller
- user-operation-controller
- src
- scripts/create-package/package-template
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
41 | | - | |
42 | | - | |
43 | 36 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 37 | + | |
47 | 38 | | |
48 | 39 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 40 | + | |
52 | 41 | | |
53 | 42 | | |
54 | 43 | | |
| |||
84 | 73 | | |
85 | 74 | | |
86 | 75 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 76 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
| |||
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
69 | | - | |
| 66 | + | |
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
76 | | - | |
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
| |||
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
90 | | - | |
| 86 | + | |
91 | 87 | | |
92 | 88 | | |
93 | 89 | | |
| |||
100 | 96 | | |
101 | 97 | | |
102 | 98 | | |
| 99 | + | |
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4359 | 4359 | | |
4360 | 4360 | | |
4361 | 4361 | | |
4362 | | - | |
| 4362 | + | |
4363 | 4363 | | |
4364 | 4364 | | |
4365 | 4365 | | |
| |||
4372 | 4372 | | |
4373 | 4373 | | |
4374 | 4374 | | |
4375 | | - | |
4376 | | - | |
4377 | | - | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
4378 | 4378 | | |
4379 | | - | |
| 4379 | + | |
4380 | 4380 | | |
4381 | | - | |
| 4381 | + | |
4382 | 4382 | | |
4383 | 4383 | | |
4384 | 4384 | | |
| |||
4394 | 4394 | | |
4395 | 4395 | | |
4396 | 4396 | | |
4397 | | - | |
4398 | | - | |
4399 | | - | |
| 4397 | + | |
| 4398 | + | |
| 4399 | + | |
4400 | 4400 | | |
4401 | 4401 | | |
4402 | 4402 | | |
| |||
4412 | 4412 | | |
4413 | 4413 | | |
4414 | 4414 | | |
4415 | | - | |
4416 | | - | |
4417 | | - | |
| 4415 | + | |
| 4416 | + | |
| 4417 | + | |
4418 | 4418 | | |
4419 | | - | |
| 4419 | + | |
4420 | 4420 | | |
4421 | | - | |
| 4421 | + | |
4422 | 4422 | | |
4423 | 4423 | | |
4424 | 4424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3901 | 3901 | | |
3902 | 3902 | | |
3903 | 3903 | | |
3904 | | - | |
| 3904 | + | |
3905 | 3905 | | |
3906 | 3906 | | |
3907 | 3907 | | |
| |||
3914 | 3914 | | |
3915 | 3915 | | |
3916 | 3916 | | |
3917 | | - | |
3918 | | - | |
3919 | | - | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
3920 | 3920 | | |
3921 | 3921 | | |
3922 | 3922 | | |
| |||
3933 | 3933 | | |
3934 | 3934 | | |
3935 | 3935 | | |
3936 | | - | |
3937 | | - | |
3938 | | - | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
3939 | 3939 | | |
3940 | 3940 | | |
3941 | 3941 | | |
| |||
3952 | 3952 | | |
3953 | 3953 | | |
3954 | 3954 | | |
3955 | | - | |
3956 | | - | |
3957 | | - | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
3958 | 3958 | | |
3959 | 3959 | | |
3960 | 3960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments