1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00

Update Jest config to avoid transpiling dependencies (#16068)

* Use stable version of Jest

* Update Jest config
This commit is contained in:
Maarten Zuidhoorn 2022-10-04 17:58:22 +02:00 committed by GitHub
parent 392b08a5c4
commit 22f07aefe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 376 additions and 376 deletions

View File

@ -58,17 +58,11 @@ module.exports = {
testTimeout: 2500,
// We have to specify the environment we are running in, which is jsdom. The
// default is 'node'. This can be modified *per file* using a comment at the
// head of the file. So it may be worth while to switch to 'node' in any
// head of the file. So it may be worthwhile to switch to 'node' in any
// background tests.
testEnvironment: 'jsdom',
// Our configuration somehow is calling into the esm folder / files of
// some modules. Jest supports ESM but our code is not set to emit ESM files
// so we are telling jest to use babel to transform the node_modules listed.
// Note: for some reason I could not hammer down to the node_modules
// installed in @metamask/controllers so I had to just blanket specify all
// of the @metamask/controllers folder.
transformIgnorePatterns: [
'/node_modules/(?!(multiformats|uuid|nanoid|@metamask/controllers|@metamask/snap-controllers|@metamask/rpc-methods)/)',
],
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons'],
},
workerIdleMemoryLimit: '500MB',
};

View File

@ -14,4 +14,7 @@ module.exports = {
'^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx',
},
testEnvironment: 'jsdom',
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons'],
},
};

View File

@ -136,9 +136,9 @@
"@metamask/providers": "^9.0.0",
"@metamask/rpc-methods": "^0.21.0",
"@metamask/slip44": "^2.1.0",
"@metamask/smart-transactions-controller": "^2.3.2",
"@metamask/snap-controllers": "^0.21.0",
"@metamask/snap-utils": "^0.21.0",
"@metamask/smart-transactions-controller": "^2.3.2",
"@ngraveio/bc-ur": "^1.1.6",
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.6.2",
@ -350,9 +350,9 @@
"history": "^5.0.0",
"improved-yarn-audit": "^3.0.0",
"ini": "^3.0.0",
"jest": "^29.0.0-alpha.5",
"jest": "^29.1.2",
"jest-canvas-mock": "^2.3.1",
"jest-environment-jsdom": "^29.0.0-alpha.4",
"jest-environment-jsdom": "^29.1.2",
"jest-it-up": "^2.0.2",
"jsdom": "^11.2.0",
"koa": "^2.7.0",

729
yarn.lock

File diff suppressed because it is too large Load Diff