Bump jest from 27.5.1 to 28.1.0 (#17612)
* Bump jest from 27.5.1 to 28.1.0 Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 28.1.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * resolve upgrade errors Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
This commit is contained in:
parent
05fcdfcb2e
commit
c2af21e730
4 changed files with 443 additions and 630 deletions
|
|
@ -1,14 +1,26 @@
|
|||
/* eslint-env node */
|
||||
// See https://github.com/jsdom/jsdom/issues/2524#issuecomment-736672511
|
||||
const Environment = require('jest-environment-jsdom');
|
||||
const Environment = require('jest-environment-jsdom').default;
|
||||
|
||||
module.exports = class CustomTestEnvironment extends Environment {
|
||||
constructor(config, context) {
|
||||
super(config, context);
|
||||
}
|
||||
|
||||
async setup() {
|
||||
await super.setup();
|
||||
// See https://github.com/jsdom/jsdom/issues/2524#issuecomment-736672511
|
||||
if (typeof this.global.TextEncoder === 'undefined') {
|
||||
const { TextEncoder, TextDecoder } = require('util');
|
||||
this.global.TextEncoder = TextEncoder;
|
||||
this.global.TextDecoder = TextDecoder;
|
||||
}
|
||||
}
|
||||
|
||||
async teardown() {
|
||||
await super.teardown();
|
||||
}
|
||||
|
||||
getVmContext() {
|
||||
return super.getVmContext();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -55,4 +55,6 @@ module.exports = {
|
|||
'jest-watch-typeahead/testname',
|
||||
],
|
||||
testEnvironment: './customJsDomEnvironment.js',
|
||||
// We occasionally need to allow transpiling of specific node_modules. See https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
|
||||
transformIgnorePatterns: ['/node_modules/(?!(preact|react-colorful)/)'],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,8 +80,9 @@
|
|||
"eslint-plugin-no-only-tests": "^2.6.0",
|
||||
"eslint-plugin-react": "^7.29.4",
|
||||
"husky": "^8.0.1",
|
||||
"jest": "27.5.1",
|
||||
"jest": "28.1.0",
|
||||
"jest-axe": "^6.0.0",
|
||||
"jest-environment-jsdom": "^28.1.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"jest-watch-typeahead": "^1.1.0",
|
||||
"jsdom": "^19.0.0",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue