Skip to content

Commit b596ce9

Browse files
chore: upgrade dependencies in Jest examples (#36858)
Ref: #36842, #36632, #36787 Upgrading to Jest 28, and aligning Babel example with `with-jest` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
1 parent 6a00a1b commit b596ce9

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

examples/with-jest-babel/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Quickly get started using [Create Next App](https://github.com/vercel/next.js/tr
1111
In your terminal, run the following command:
1212

1313
```bash
14-
npx create-next-app --example with-jest with-jest-app
14+
npx create-next-app --example with-jest-babel with-jest-babel-app
1515
# or
16-
yarn create next-app --example with-jest with-jest-app
16+
yarn create next-app --example with-jest-babel with-jest-babel-app
1717
# or
18-
pnpm create next-app -- --example with-jest with-jest-app
18+
pnpm create next-app -- --example with-jest-babel with-jest-babel-app
1919
```
2020

2121
## Run Jest Tests

examples/with-jest-babel/package.json

+10-13
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,25 @@
22
"private": true,
33
"scripts": {
44
"dev": "next dev",
5-
"lint": "next lint",
65
"build": "next build",
76
"start": "next start",
87
"test": "jest --watch",
98
"test:ci": "jest --ci"
109
},
1110
"dependencies": {
1211
"next": "latest",
13-
"react": "^17.0.2",
14-
"react-dom": "^17.0.2"
12+
"react": "^18.1.0",
13+
"react-dom": "^18.1.0"
1514
},
1615
"devDependencies": {
17-
"@testing-library/jest-dom": "5.16.1",
18-
"@testing-library/react": "12.1.2",
19-
"@testing-library/user-event": "13.5.0",
20-
"@types/react": "17.0.37",
21-
"babel-jest": "27.4.5",
22-
"eslint": "8.5.0",
23-
"eslint-config-next": "latest",
24-
"eslint-plugin-testing-library": "5.0.1",
16+
"@testing-library/jest-dom": "5.16.4",
17+
"@testing-library/react": "13.2.0",
18+
"@testing-library/user-event": "14.2.0",
19+
"@types/react": "18.0.9",
20+
"babel-jest": "28.1.0",
2521
"identity-obj-proxy": "3.0.0",
26-
"jest": "27.4.5",
27-
"typescript": "4.5.4"
22+
"jest": "28.1.0",
23+
"jest-environment-jsdom": "28.1.0",
24+
"typescript": "4.6.4"
2825
}
2926
}

examples/with-jest/package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
},
1010
"dependencies": {
1111
"next": "latest",
12-
"react": "^17.0.2",
13-
"react-dom": "^17.0.2"
12+
"react": "^18.1.0",
13+
"react-dom": "^18.1.0"
1414
},
1515
"devDependencies": {
16-
"@testing-library/jest-dom": "5.16.1",
17-
"@testing-library/react": "12.1.2",
18-
"@testing-library/user-event": "13.5.0",
19-
"@types/react": "17.0.38",
20-
"jest": "27.4.5",
21-
"typescript": "4.5.4"
16+
"@testing-library/jest-dom": "5.16.4",
17+
"@testing-library/react": "13.2.0",
18+
"@testing-library/user-event": "14.2.0",
19+
"@types/react": "18.0.9",
20+
"jest": "28.1.0",
21+
"jest-environment-jsdom": "28.1.0",
22+
"typescript": "4.6.4"
2223
}
2324
}

0 commit comments

Comments
 (0)