File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,13 @@ If you’d like to test components in isolation from the child components they r
92
92
To install ` react-testing-library ` and ` jest-dom ` , you can run:
93
93
94
94
``` 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
96
96
```
97
97
98
98
Alternatively you may use ` yarn ` :
99
99
100
100
``` sh
101
- yarn add @testing-library/react @testing-library/jest-dom
101
+ yarn add @testing-library/react @testing-library/dom @testing-library/ jest-dom
102
102
```
103
103
104
104
If you want to avoid boilerplate in your test files, you can create a [ ` src/setupTests.js ` ] ( #initializing-test-environment ) file:
Original file line number Diff line number Diff line change 1
1
{
2
2
"package" : {
3
3
"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" ,
6
7
"@testing-library/user-event" : " ^13.2.1" ,
7
8
"@types/jest" : " ^27.0.1" ,
8
9
"@types/node" : " ^16.7.13" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"package" : {
3
3
"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" ,
6
7
"@testing-library/user-event" : " ^13.2.1" ,
7
8
"web-vitals" : " ^2.1.0"
8
9
},
You can’t perform that action at this time.
0 commit comments