Skip to content

Commit fd5a609

Browse files
authored
Merge pull request #999 from Patternslib/upgrade
Upgrade
2 parents ada4d8b + f45fbe6 commit fd5a609

File tree

4 files changed

+578
-688
lines changed

4 files changed

+578
-688
lines changed

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ module.exports = {
44
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
55
transform: {
66
"^.+\\.[t|j]sx?$": "babel-jest",
7-
"\\.(html|xml|svg)$": "jest-raw-loader",
7+
"\\.(html|xml|svg)$": "<rootDir>/webpack/jest-raw-loader.js",
88
},
99
moduleNameMapper: {
1010
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
1111
},
1212
testEnvironment: "jsdom",
13-
transformIgnorePatterns: ["/node_modules/(?!screenfull/*).+\\.[t|j]sx?$"],
13+
transformIgnorePatterns: ["/node_modules/(?!preact/)(?!screenfull/).+\\.[t|j]sx?$"],
1414
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"identity-obj-proxy": "^3.0.0",
5858
"imports-loader": "^3.1.0",
5959
"inspectpack": "^4.7.1",
60-
"jest": "^27.5.1",
61-
"jest-raw-loader": "^1.0.1",
60+
"jest": "^28.1.0",
61+
"jest-environment-jsdom": "^28.1.0",
6262
"jest-watch-typeahead": "^1.1.0",
6363
"prettier": "^2.6.2",
6464
"regenerator-runtime": "^0.13.9",

webpack/jest-raw-loader.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// jest-raw-loader compatibility with Jest version 28.
2+
// See: https://github.com/keplersj/jest-raw-loader/pull/239
3+
module.exports = {
4+
process: (content) => {
5+
return {
6+
code: "module.exports = " + JSON.stringify(content),
7+
};
8+
},
9+
};

0 commit comments

Comments
 (0)