Skip to content

Commit

Permalink
chore(docs): Add Jest 28 jest-environment-jsdom information (#35904)
Browse files Browse the repository at this point in the history
Co-authored-by: Lennart <lekoarts@gmail.com>
  • Loading branch information
Jon Rutter and LekoArts authored Jun 13, 2022
1 parent 7573c2c commit 96a18c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/docs/how-to/testing/testing-react-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Install the library as one of your project's `devDependencies`. Optionally you m
npm install --save-dev @testing-library/react @testing-library/jest-dom
```

If you are using Jest 28, you also need to install `jest-environment-jsdom`:

```shell
npm install --save-dev jest-environment-jsdom
```

Create the file `setup-test-env.js` at the root of your project. Insert this code into it:

```js:title=setup-test-env.js
Expand Down

0 comments on commit 96a18c9

Please sign in to comment.