Skip to content

Commit

Permalink
New install instructions for RTL (#1384)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Apr 22, 2024
1 parent 93b87b8 commit a6bf3f5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/react-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ sidebar_label: Introduction
[`React Testing Library`][gh] builds on top of `DOM Testing Library` by adding
APIs for working with React components.

> Projects created with [`Create React App`](https://create-react-app.dev/) have
> out of the box support for **React Testing Library**. If that is not the case,
> you can add it via `npm` like so:
## Installation

```bash npm2yarn
npm install --save-dev @testing-library/react
```

- [React Testing Library on GitHub][gh]
### With TypeScript

To get full type coverage, you need to install the types for `react-dom` as well:

```bash npm2yarn
npm install --save-dev @testing-library/react @types/react-dom
```


[gh]: https://github.com/testing-library/react-testing-library

Expand Down

0 comments on commit a6bf3f5

Please sign in to comment.