Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New install instructions for RTL #1384

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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