Skip to content

Commit

Permalink
chore: upgrade RTL version to avoid peer-deps mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanBobi committed Dec 26, 2024
1 parent dd420a6 commit 50d0156
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ If you’d like to test components in isolation from the child components they r
To install `react-testing-library` and `jest-dom`, you can run:

```sh
npm install --save @testing-library/react @testing-library/jest-dom
npm install --save @testing-library/react @testing-library/dom @testing-library/jest-dom
```

Alternatively you may use `yarn`:

```sh
yarn add @testing-library/react @testing-library/jest-dom
yarn add @testing-library/react @testing-library/dom @testing-library/jest-dom
```

If you want to avoid boilerplate in your test files, you can create a [`src/setupTests.js`](#initializing-test-environment) file:
Expand Down
5 changes: 3 additions & 2 deletions packages/cra-template-typescript/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"package": {
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
Expand Down
5 changes: 3 additions & 2 deletions packages/cra-template/template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"package": {
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^13.2.1",
"web-vitals": "^2.1.0"
},
Expand Down

0 comments on commit 50d0156

Please sign in to comment.