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

Update README.md #1389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update README.md
Added commands for pnpm.
ShayokhShorfuddin authored Mar 22, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit e0aee211a7a79d50ffb71b987e26a0196d89ca9e
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -105,14 +105,18 @@ Starting from RTL version 16, you'll also need to install
npm install --save-dev @testing-library/react @testing-library/dom
```

or

for installation via [yarn][yarn]

```
yarn add --dev @testing-library/react @testing-library/dom
```

or, for installation via [pnpm][pnpm]

```
pnpm add -D @testing-library/react @testing-library/dom
```

This library has `peerDependencies` listings for `react`, `react-dom` and
starting from RTL version 16 also `@testing-library/dom`.

@@ -121,10 +125,13 @@ older version of React, be sure to install version 12:_

```
npm install --save-dev @testing-library/react@12
```
```
yarn add --dev @testing-library/react@12
```
```
pnpm add -D @testing-library/react@12
```

You may also be interested in installing `@testing-library/jest-dom` so you can
use [the custom jest matchers](https://github.com/testing-library/jest-dom).
@@ -656,6 +663,7 @@ Contributions of any kind welcome!
[npm]: https://www.npmjs.com/
[yarn]: https://classic.yarnpkg.com
[node]: https://nodejs.org
[pnpm]: https://pnpm.io
[build-badge]: https://img.shields.io/github/actions/workflow/status/testing-library/react-testing-library/validate.yml?branch=main&logo=github
[build]: https://github.com/testing-library/react-testing-library/actions?query=workflow%3Avalidate
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/react-testing-library.svg?style=flat-square