fix(jsdom): cumulative Jest updates with support for TextEncoder/TextDecoder (#8111)
This commit is contained in:
@@ -2,16 +2,18 @@ const path = require('path');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
rootDir: path.join(__dirname, '..', '..'),
|
rootDir: path.join(__dirname, '..', '..'),
|
||||||
testEnvironment: 'jsdom',
|
testEnvironment: 'jest-environment-jsdom',
|
||||||
testMatch: [
|
testMatch: [
|
||||||
'**/test/unit/*.js?(x)',
|
'**/test/unit/*.js?(x)',
|
||||||
'**/test/unit/**/*.js?(x)',
|
'**/test/unit/**/*.js?(x)',
|
||||||
],
|
],
|
||||||
|
setupFiles: ['<rootDir>/test/unit/jest-shim.js'],
|
||||||
setupFilesAfterEnv: ['<rootDir>/test/unit/setup.js'],
|
setupFilesAfterEnv: ['<rootDir>/test/unit/setup.js'],
|
||||||
testPathIgnorePatterns: [
|
testPathIgnorePatterns: [
|
||||||
'<rootDir>/node_modules/',
|
'<rootDir>/node_modules/',
|
||||||
'<rootDir>/test/build-artifacts/',
|
'<rootDir>/test/build-artifacts/',
|
||||||
'<rootDir>/test/mocha',
|
'<rootDir>/test/mocha',
|
||||||
|
'<rootDir>/test/unit/jest-shim.js',
|
||||||
'<rootDir>/test/unit/setup.js',
|
'<rootDir>/test/unit/setup.js',
|
||||||
'<rootDir>/test/unit/xss/anchor-target-rel/online-validator-badge.jsx',
|
'<rootDir>/test/unit/xss/anchor-target-rel/online-validator-badge.jsx',
|
||||||
'<rootDir>/test/unit/components/online-validator-badge.jsx',
|
'<rootDir>/test/unit/components/online-validator-badge.jsx',
|
||||||
|
|||||||
8045
package-lock.json
generated
8045
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -144,8 +144,9 @@
|
|||||||
"html-webpack-skip-assets-plugin": "^1.0.3",
|
"html-webpack-skip-assets-plugin": "^1.0.3",
|
||||||
"husky": "=7.0.4",
|
"husky": "=7.0.4",
|
||||||
"inspectpack": "=4.7.1",
|
"inspectpack": "=4.7.1",
|
||||||
"jest": "=27.5.1",
|
"jest": "=28.1.3",
|
||||||
"jsdom": "=16.6.0",
|
"jest-environment-jsdom": "=28.1.3",
|
||||||
|
"jsdom": "=20.0.0",
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"json-merger": "^1.1.6",
|
"json-merger": "^1.1.6",
|
||||||
"json-server": "=0.17.0",
|
"json-server": "=0.17.0",
|
||||||
@@ -176,6 +177,7 @@
|
|||||||
"stream-browserify": "^3.0.0",
|
"stream-browserify": "^3.0.0",
|
||||||
"tachyons-sass": "^4.9.5",
|
"tachyons-sass": "^4.9.5",
|
||||||
"terser-webpack-plugin": "^5.3.1",
|
"terser-webpack-plugin": "^5.3.1",
|
||||||
|
"util": "=0.12.4",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
"webpack-bundle-size-analyzer": "^3.1.0",
|
"webpack-bundle-size-analyzer": "^3.1.0",
|
||||||
"webpack-cli": "^4.9.2",
|
"webpack-cli": "^4.9.2",
|
||||||
|
|||||||
4
test/unit/jest-shim.js
Normal file
4
test/unit/jest-shim.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import { TextDecoder, TextEncoder } from "util"
|
||||||
|
|
||||||
|
global.TextDecoder = TextDecoder
|
||||||
|
global.TextEncoder = TextEncoder
|
||||||
Reference in New Issue
Block a user