Skip to content

Commit 50d0156

Browse files
committed
chore: upgrade RTL version to avoid peer-deps mismatch
1 parent dd420a6 commit 50d0156

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

docusaurus/docs/running-tests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ If you’d like to test components in isolation from the child components they r
9292
To install `react-testing-library` and `jest-dom`, you can run:
9393

9494
```sh
95-
npm install --save @testing-library/react @testing-library/jest-dom
95+
npm install --save @testing-library/react @testing-library/dom @testing-library/jest-dom
9696
```
9797

9898
Alternatively you may use `yarn`:
9999

100100
```sh
101-
yarn add @testing-library/react @testing-library/jest-dom
101+
yarn add @testing-library/react @testing-library/dom @testing-library/jest-dom
102102
```
103103

104104
If you want to avoid boilerplate in your test files, you can create a [`src/setupTests.js`](#initializing-test-environment) file:

packages/cra-template-typescript/template.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@testing-library/jest-dom": "^5.14.1",
5-
"@testing-library/react": "^13.0.0",
4+
"@testing-library/dom": "^10.4.0",
5+
"@testing-library/jest-dom": "^6.6.3",
6+
"@testing-library/react": "^16.1.0",
67
"@testing-library/user-event": "^13.2.1",
78
"@types/jest": "^27.0.1",
89
"@types/node": "^16.7.13",

packages/cra-template/template.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@testing-library/jest-dom": "^5.14.1",
5-
"@testing-library/react": "^13.0.0",
4+
"@testing-library/dom": "^10.4.0",
5+
"@testing-library/jest-dom": "^6.6.3",
6+
"@testing-library/react": "^16.1.0",
67
"@testing-library/user-event": "^13.2.1",
78
"web-vitals": "^2.1.0"
89
},

0 commit comments

Comments
 (0)