Skip to content

Commit e0aee21

Browse files
Update README.md
Added commands for pnpm.
1 parent 65bc994 commit e0aee21

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,18 @@ Starting from RTL version 16, you'll also need to install
105105
npm install --save-dev @testing-library/react @testing-library/dom
106106
```
107107

108-
or
109-
110108
for installation via [yarn][yarn]
111109

112110
```
113111
yarn add --dev @testing-library/react @testing-library/dom
114112
```
115113

114+
or, for installation via [pnpm][pnpm]
115+
116+
```
117+
pnpm add -D @testing-library/react @testing-library/dom
118+
```
119+
116120
This library has `peerDependencies` listings for `react`, `react-dom` and
117121
starting from RTL version 16 also `@testing-library/dom`.
118122

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

122126
```
123127
npm install --save-dev @testing-library/react@12
124-
125-
128+
```
129+
```
126130
yarn add --dev @testing-library/react@12
127131
```
132+
```
133+
pnpm add -D @testing-library/react@12
134+
```
128135

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

0 commit comments

Comments
 (0)