diff --git a/docs/03-pages/01-building-your-application/05-optimizing/10-testing.mdx b/docs/03-pages/01-building-your-application/05-optimizing/10-testing.mdx index d861a091ecff6..75c5937582624 100644 --- a/docs/03-pages/01-building-your-application/05-optimizing/10-testing.mdx +++ b/docs/03-pages/01-building-your-application/05-optimizing/10-testing.mdx @@ -432,9 +432,11 @@ setupFilesAfterEnv: ['/jest.setup.js'] Then, inside `jest.setup.js`, add the following import: ```js filename="jest.setup.js" -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' ``` +> [`extend-expect` was removed in `v6.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.0.0), so if you are using `@testing-library/jest-dom` before version 6, you will need to import `@testing-library/jest-dom/extend-expect` instead. + If you need to add more setup options before each test, it's common to add them to the `jest.setup.js` file above. **Optional: Absolute Imports and Module Path Aliases**