Update Jest config to avoid transpiling dependencies (#16068)

* Use stable version of Jest

* Update Jest config
feature/default_network_editable
Maarten Zuidhoorn 2 years ago committed by seaona
parent f75672ef1f
commit 7c90fe56a0
  1. 12
      jest.config.js
  2. 3
      jest.stories.config.js
  3. 4
      package.json
  4. 735
      yarn.lock

@ -61,14 +61,8 @@ module.exports = {
// 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',
};

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

@ -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",

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save