Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3122be2
chore: Update Jest related packages to ^28
Gudahtt Nov 17, 2025
6c035dd
Add workaround for uuid incompatibility
Gudahtt Nov 17, 2025
608af12
WIP
Gudahtt Nov 17, 2025
b1fe19d
WIP
Gudahtt Nov 17, 2025
b753669
Explicitly specify environments and update them
Gudahtt Nov 17, 2025
91d8b82
Update to fix bug with fake timers
Gudahtt Nov 17, 2025
c7ce6b1
Fix depcheck lint error
Gudahtt Nov 19, 2025
fa93c24
Update test enviornment imports
Gudahtt Nov 19, 2025
6f4bdf0
Use modern timers everywhere (we already do on main, using legacy was…
Gudahtt Nov 19, 2025
9b947d4
Fix lint error
Gudahtt Nov 19, 2025
54a41ee
fix: ensure nock can intercept fetch requests in Jest 28
cryptodev-2s Nov 22, 2025
989ed2b
fix: add export statement to make setup.ts unambiguous module
cryptodev-2s Nov 22, 2025
12dc701
fix tests
cryptodev-2s Nov 25, 2025
b498c3b
Fix Jest 28 compatibility and formatting
cryptodev-2s Nov 27, 2025
6e9bd12
chore: update yarn.lock for Jest 28 compatibility
cryptodev-2s Nov 27, 2025
8fc024b
fix: dedupe deps
cryptodev-2s Nov 27, 2025
c61401a
fix: resolve YN0078 error for @metamask/eth-json-rpc-provider
cryptodev-2s Nov 27, 2025
676393f
Merge remote-tracking branch 'origin/main' into fix/nock-jest28-compa…
cryptodev-2s Feb 2, 2026
67acb78
fix: update Jest 28 compatibility for jest-environment packages
cryptodev-2s Feb 2, 2026
e194052
fix: resolve ESLint errors for uuid and import-x/no-unassigned-import
cryptodev-2s Feb 2, 2026
1564b22
fix: update remaining packages to Jest 28 versions
cryptodev-2s Feb 2, 2026
4545646
fix: update permission-log-controller tests for Jest 28 compatibility
cryptodev-2s Feb 2, 2026
83a183d
fix: update remote-feature-flag-controller test for Jest 28 compatibi…
cryptodev-2s Feb 2, 2026
279f00a
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 2, 2026
43a1b65
refactor: use named import for jest-environment-jsdom TestEnvironment
cryptodev-2s Feb 2, 2026
d51b405
fix: .depcheckrc.yml
cryptodev-2s Feb 2, 2026
3cf47ab
chore: update to latest Jest 28 versions
cryptodev-2s Feb 2, 2026
5bf18b8
ci: increase Node.js heap size for lint step
cryptodev-2s Feb 2, 2026
2a7c0cd
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 3, 2026
46f6d91
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 3, 2026
acb8a43
fix: remove unrelated changes
cryptodev-2s Feb 3, 2026
6ae810c
fix: @typescript-eslint/prefer-optional-chain
cryptodev-2s Feb 3, 2026
544b955
fix: package-template jest versions
cryptodev-2s Feb 3, 2026
f2a8c6f
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 3, 2026
3cbe600
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 4, 2026
281fd9d
Merge remote-tracking branch 'origin/main' into chore/migrate-jest-to…
cryptodev-2s Feb 4, 2026
a0772db
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 4, 2026
0f0c19d
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 5, 2026
ff28ddb
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 5, 2026
eec189c
Merge remote-tracking branch 'origin/main' into chore/migrate-jest-to…
cryptodev-2s Feb 6, 2026
87d2dda
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 7, 2026
648fb0f
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 8, 2026
b3bd6eb
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 9, 2026
bd0c760
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 9, 2026
f4a0322
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 9, 2026
bc13cce
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 10, 2026
1b5a176
fix: restore bridge status tests
cryptodev-2s Feb 10, 2026
91bbfb5
fix: bridge-status-controller tests
cryptodev-2s Feb 10, 2026
572c8ab
Merge remote-tracking branch 'origin/main' into chore/migrate-jest-to…
cryptodev-2s Feb 10, 2026
fe08988
Merge remote-tracking branch 'origin/main' into chore/migrate-jest-to…
cryptodev-2s Feb 10, 2026
7ac76e3
fix: restore lint-build-test.yml
cryptodev-2s Feb 10, 2026
34bb6f4
Merge branch 'main' into chore/migrate-jest-to-v28-2
cryptodev-2s Feb 10, 2026
5391e7c
chore: migration jest to v29
cryptodev-2s Feb 10, 2026
347965f
fix: remove keyring-controller timeout increase
cryptodev-2s Feb 10, 2026
b03cfdb
chore: remove babel dependencies in favor of ts-jest
cryptodev-2s Feb 10, 2026
4947e85
fix: remove tests/setup verbosity
cryptodev-2s Feb 10, 2026
bf82aee
fix: restore transaction pay controller useless changes
cryptodev-2s Feb 10, 2026
c8866c8
fix: revert unnecessary stopAllPolling/flushPromises reorder
cryptodev-2s Feb 10, 2026
a5ffb59
fix: remove transaction controller tests changes
cryptodev-2s Feb 10, 2026
68f016c
fix: remove Jest 28 performance workaround
cryptodev-2s Feb 10, 2026
bd345b5
fix: remote-feature-flag-controller tests
cryptodev-2s Feb 10, 2026
9082f5a
chore: use import instead of require in tests/setup.ts
cryptodev-2s Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ ignores:
- 'typedoc'
# Ignore plugins for tools
- '@typescript-eslint/*'
- 'babel-jest'
- 'eslint-config-*'
- 'eslint-plugin-*'
- 'jest-silent-reporter'
- 'prettier-plugin-packagejson'
- 'typescript-eslint'
# Jest environment referenced in `jest.config.scripts.js`
- 'jest-environment-node'
- 'jest-environment-jsdom'
# Ignore dependencies imported implicitly by tools
- 'eslint-import-resolver-typescript'
# Ignore dependencies which plug into the NPM lifecycle
Expand Down
9 changes: 0 additions & 9 deletions babel.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions jest.config.packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module.exports = {
// so in that case use their published versions
'<rootDir>/../../node_modules/@metamask/$1',
],
'^uuid$': require.resolve('uuid'),
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down Expand Up @@ -188,9 +189,6 @@ module.exports = {
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: undefined,

Expand Down
20 changes: 2 additions & 18 deletions jest.config.scripts.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*
* NOTE:
* This config uses `babel-jest` due to ESM- / TypeScript-related incompatibilities with our
* current version (`^27`) of `jest` and `ts-jest`. We can switch to `ts-jest` once we have
* migrated our Jest dependencies to version `>=29`.
*/

module.exports = {
Expand Down Expand Up @@ -38,17 +33,11 @@ module.exports = {
},
},

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// This ensures that Babel can resolve subpath exports correctly.
moduleNameMapper: {
'^@metamask/utils/(.+)$': [
'<rootDir>/node_modules/@metamask/utils/dist/$1.cjs',
],
'^uuid$': require.resolve('uuid'),
},

// Disabled due to use of 'transform' below.
// // A preset that is used as a base for Jest's configuration
// preset: 'ts-jest',
preset: 'ts-jest',

// The path to the Prettier executable used to format snapshots
// Jest doesn't support Prettier 3 yet, so we use Prettier 2
Expand Down Expand Up @@ -84,9 +73,4 @@ module.exports = {

// Default timeout of a test in milliseconds.
testTimeout: 5000,

// A map from regular expressions to paths to transformers
transform: {
'\\.[jt]sx?$': 'babel-jest',
},
};
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
"ws@7.4.6": "^7.5.10"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/create-release-branch": "^4.1.4",
Expand All @@ -66,14 +63,13 @@
"@metamask/network-controller": "^29.0.0",
"@metamask/utils": "^11.9.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
"@types/semver": "^7",
"@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.48.0",
"@yarnpkg/types": "^4.0.0",
"babel-jest": "^29.7.0",
"comment-json": "^4.5.1",
"depcheck": "^1.4.7",
"eslint": "^9.39.1",
Expand All @@ -87,7 +83,7 @@
"eslint-plugin-promise": "^7.1.0",
"execa": "^5.0.0",
"isomorphic-fetch": "^3.0.0",
"jest": "^27.5.1",
"jest": "^29.7.0",
"jest-silent-reporter": "^0.5.0",
"lodash": "^4.17.21",
"nock": "^13.3.1",
Expand All @@ -100,6 +96,7 @@
"tsx": "^4.20.5",
"typescript": "~5.3.3",
"typescript-eslint": "^8.48.0",
"uuid": "^8.3.2",
"yargs": "^17.7.2"
},
"packageManager": "yarn@4.10.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/account-tree-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
"@metamask/keyring-api": "^21.5.0",
"@metamask/providers": "^22.1.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4359,7 +4359,7 @@ describe('AccountTreeController', () => {
controller.metadata,
'includeInDebugSnapshot',
),
).toMatchInlineSnapshot(`Object {}`);
).toMatchInlineSnapshot(`{}`);
});

it('includes expected state in state logs', () => {
Expand All @@ -4372,13 +4372,13 @@ describe('AccountTreeController', () => {
'includeInStateLogs',
),
).toMatchInlineSnapshot(`
Object {
"accountGroupsMetadata": Object {},
"accountTree": Object {
{
"accountGroupsMetadata": {},
"accountTree": {
"selectedAccountGroup": "",
"wallets": Object {},
"wallets": {},
},
"accountWalletsMetadata": Object {},
"accountWalletsMetadata": {},
"hasAccountTreeSyncingSyncedAtLeastOnce": false,
}
`);
Expand All @@ -4394,9 +4394,9 @@ describe('AccountTreeController', () => {
'persist',
),
).toMatchInlineSnapshot(`
Object {
"accountGroupsMetadata": Object {},
"accountWalletsMetadata": Object {},
{
"accountGroupsMetadata": {},
"accountWalletsMetadata": {},
"hasAccountTreeSyncingSyncedAtLeastOnce": false,
}
`);
Expand All @@ -4412,13 +4412,13 @@ describe('AccountTreeController', () => {
'usedInUi',
),
).toMatchInlineSnapshot(`
Object {
"accountGroupsMetadata": Object {},
"accountTree": Object {
{
"accountGroupsMetadata": {},
"accountTree": {
"selectedAccountGroup": "",
"wallets": Object {},
"wallets": {},
},
"accountWalletsMetadata": Object {},
"accountWalletsMetadata": {},
"hasAccountTreeSyncingSyncedAtLeastOnce": false,
"isAccountTreeSyncingInProgress": false,
}
Expand Down
6 changes: 3 additions & 3 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
"@metamask/controller-utils": "^11.18.0",
"@metamask/providers": "^22.1.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"@types/readable-stream": "^2.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
Expand Down
20 changes: 10 additions & 10 deletions packages/accounts-controller/src/AccountsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3901,7 +3901,7 @@ describe('AccountsController', () => {
controller.metadata,
'includeInDebugSnapshot',
),
).toMatchInlineSnapshot(`Object {}`);
).toMatchInlineSnapshot(`{}`);
});

it('includes expected state in state logs', () => {
Expand All @@ -3914,9 +3914,9 @@ describe('AccountsController', () => {
'includeInStateLogs',
),
).toMatchInlineSnapshot(`
Object {
"internalAccounts": Object {
"accounts": Object {},
{
"internalAccounts": {
"accounts": {},
"selectedAccount": "",
},
}
Expand All @@ -3933,9 +3933,9 @@ describe('AccountsController', () => {
'persist',
),
).toMatchInlineSnapshot(`
Object {
"internalAccounts": Object {
"accounts": Object {},
{
"internalAccounts": {
"accounts": {},
"selectedAccount": "",
},
}
Expand All @@ -3952,9 +3952,9 @@ describe('AccountsController', () => {
'usedInUi',
),
).toMatchInlineSnapshot(`
Object {
"internalAccounts": Object {
"accounts": Object {},
{
"internalAccounts": {
"accounts": {},
"selectedAccount": "",
},
}
Expand Down
6 changes: 3 additions & 3 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ describe('AddressBookController', () => {
controller.metadata,
'includeInDebugSnapshot',
),
).toMatchInlineSnapshot(`Object {}`);
).toMatchInlineSnapshot(`{}`);
});

it('includes expected state in state logs', () => {
Expand All @@ -662,8 +662,8 @@ describe('AddressBookController', () => {
'includeInStateLogs',
),
).toMatchInlineSnapshot(`
Object {
"addressBook": Object {},
{
"addressBook": {},
}
`);
});
Expand All @@ -678,8 +678,8 @@ describe('AddressBookController', () => {
'persist',
),
).toMatchInlineSnapshot(`
Object {
"addressBook": Object {},
{
"addressBook": {},
}
`);
});
Expand All @@ -694,8 +694,8 @@ describe('AddressBookController', () => {
'usedInUi',
),
).toMatchInlineSnapshot(`
Object {
"addressBook": Object {},
{
"addressBook": {},
}
`);
});
Expand Down
6 changes: 3 additions & 3 deletions packages/ai-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-data-regulation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest": "^29.7.0",
"nock": "^13.3.1",
"sinon": "^9.2.4",
"ts-jest": "^27.1.5",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.5.2",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.5",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
Loading
Loading