Skip to content

Commit bd82320

Browse files
MatanBobikarlhorky
authored andcommitted
chore: upgrade RTL version to avoid peer-deps mismatch
1 parent 1a94470 commit bd82320

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

docusaurus/docs/running-tests.md

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 2 deletions
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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"package": {
33
"devDependencies": {
44
"@jest/globals": "^29.5.0",
5-
"@testing-library/jest-dom": "^5.14.1",
6-
"@testing-library/react": "^13.0.0",
5+
"@testing-library/dom": "^10.4.0",
6+
"@testing-library/jest-dom": "^6.6.3",
7+
"@testing-library/react": "^16.1.0",
78
"@testing-library/user-event": "^13.2.1",
89
"@types/testing-library__jest-dom": "^5.14.5",
910
"jest": "^29.5.0",

0 commit comments

Comments
 (0)