diff --git a/docusaurus/docs/running-tests.md b/docusaurus/docs/running-tests.md index ecb818b5161..a87f7b8cc08 100644 --- a/docusaurus/docs/running-tests.md +++ b/docusaurus/docs/running-tests.md @@ -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: diff --git a/packages/cra-template-typescript/template.json b/packages/cra-template-typescript/template.json index db2d4761047..86303755264 100644 --- a/packages/cra-template-typescript/template.json +++ b/packages/cra-template-typescript/template.json @@ -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", diff --git a/packages/cra-template/template.json b/packages/cra-template/template.json index 7610e572c16..e40a97d7eba 100644 --- a/packages/cra-template/template.json +++ b/packages/cra-template/template.json @@ -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" },