Skip to content

Commit

Permalink
New install instructions for RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 22, 2024
1 parent 0796527 commit 7395d09
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 7395d09

Please sign in to comment.