Skip to content

Commit 1143652

Browse files
authored
chore: update to Jest v29 (#9895)
1 parent 7f85014 commit 1143652

29 files changed

+1819
-2585
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
- shamsup
140140
- shihanng
141141
- shivamsinghchahar
142+
- SimenB
142143
- SkayuX
143144
- souzasmatheus
144145
- srmagura

package.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
"packages/react-router-dom-v5-compat",
99
"packages/react-router-native",
1010
"packages/router"
11-
],
12-
"nohoist": [
13-
"**/react-native",
14-
"**/react-native/**"
1511
]
1612
},
1713
"scripts": {
@@ -59,7 +55,7 @@
5955
"@rollup/plugin-typescript": "^8.3.2",
6056
"@testing-library/jest-dom": "5.16.3",
6157
"@testing-library/react": "^13.3.0",
62-
"@types/jest": "26.x",
58+
"@types/jest": "29.x",
6359
"@types/jsdom": "16.2.14",
6460
"@types/jsonfile": "^6.0.1",
6561
"@types/react": "^18.0.15",
@@ -71,7 +67,7 @@
7167
"@typescript-eslint/parser": "^4.28.3",
7268
"abort-controller": "^3.0.0",
7369
"babel-eslint": "^10.1.0",
74-
"babel-jest": "^26.6.3",
70+
"babel-jest": "^29.0.3",
7571
"babel-plugin-dev-expression": "^0.2.2",
7672
"chalk": "^4.1.1",
7773
"cheerio": "^1.0.0-rc.10",
@@ -85,9 +81,9 @@
8581
"eslint-plugin-react-hooks": "next",
8682
"fs-extra": "^10.1.0",
8783
"history": "^5.3.0",
88-
"jest": "^26.6.3",
84+
"jest": "^29.0.3",
85+
"jest-environment-jsdom": "^29.0.3",
8986
"jsonfile": "^6.1.0",
90-
"metro-react-native-babel-preset": "^0.57.0",
9187
"patch-package": "^6.4.7",
9288
"prettier": "^2.5.1",
9389
"prompt-confirm": "^2.0.4",
@@ -100,7 +96,6 @@
10096
"rollup-plugin-prettier": "^2.2.2",
10197
"rollup-plugin-terser": "^7.0.2",
10298
"semver": "^7.3.5",
103-
"ts-jest": "^26.5.6",
10499
"type-fest": "^2.13.0",
105100
"typescript": "^4.7.3"
106101
},
@@ -121,7 +116,7 @@
121116
"none": "11.5 kB"
122117
},
123118
"packages/react-router-dom/dist/umd/react-router-dom.production.min.js": {
124-
"none": "17 kB"
119+
"none": "17.5 kB"
125120
}
126121
}
127122
}

packages/react-router-dom-v5-compat/jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
testEnvironment: "jsdom",
23
testMatch: ["**/__tests__/*-test.[jt]s?(x)"],
34
transform: {
45
"\\.[jt]sx?$": "./jest-transformer.js",
@@ -9,6 +10,13 @@ module.exports = {
910
setupFiles: ["./__tests__/setup.ts"],
1011
moduleNameMapper: {
1112
"^@remix-run/router$": "<rootDir>/../router/index.ts",
13+
"^@remix-run/web-blob$": require.resolve("@remix-run/web-blob"),
14+
"^@remix-run/web-fetch$": require.resolve("@remix-run/web-fetch"),
15+
"^@remix-run/web-form-data$": require.resolve("@remix-run/web-form-data"),
16+
"^@remix-run/web-stream$": require.resolve("@remix-run/web-stream"),
17+
"^@web3-storage/multipart-parser$": require.resolve(
18+
"@web3-storage/multipart-parser"
19+
),
1220
"^react-router$": "<rootDir>/../react-router/index.ts",
1321
"^react-router-dom-v5-compat$": "<rootDir>/index.ts",
1422
},

packages/react-router-dom/__tests__/custom-environment.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)