Unverified Commit 5d758c7e authored by Tooooooooon's avatar Tooooooooon Committed by GitHub

update readme in nextjs testing (#54322)

Co-authored-by: 's avatarMichael Novotny <446260+manovotny@users.noreply.github.com>
parent 6773ea86
...@@ -432,9 +432,11 @@ setupFilesAfterEnv: ['<rootDir>/jest.setup.js'] ...@@ -432,9 +432,11 @@ setupFilesAfterEnv: ['<rootDir>/jest.setup.js']
Then, inside `jest.setup.js`, add the following import: Then, inside `jest.setup.js`, add the following import:
```js filename="jest.setup.js" ```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. 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** **Optional: Absolute Imports and Module Path Aliases**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment