Skip to content

Commit 2978f4a

Browse files
semoalSergio Moreno
and
Sergio Moreno
authored
feat: convert npm to yarn commands on docs (#784)
Co-authored-by: Sergio Moreno <[email protected]>
1 parent 069b362 commit 2978f4a

File tree

30 files changed

+96
-37
lines changed

30 files changed

+96
-37
lines changed

docs/angular-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ builds on top of
99
[`DOM Testing Library`](https://github.com/testing-library/dom-testing-library)
1010
by adding APIs for working with Angular components.
1111

12-
```bash
12+
```bash npm2yarn
1313
npm install --save-dev @testing-library/angular
1414
```
1515

docs/bs-react-testing-library/intro.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Bindings for several testing libraries have been ported to [ReasonML][re].
1313
[`bs-dom-testing-library`][gh-dom] contains [BuckleScript][bs] bindings for
1414
`DOM Testing Library`.
1515

16-
```
16+
```bash npm2yarn
1717
npm install --save-dev bs-dom-testing-library
1818
npm install --save-dev bs-react-testing-library
1919
```
@@ -49,7 +49,7 @@ _or_
4949
This is what [BuckleScript][bs] uses to compile the [Reason][re] code to JS. If
5050
it is not in your project you can install it like so:
5151

52-
```
52+
```bash npm2yarn
5353
npm install --save-dev bs-platform
5454
```
5555

@@ -60,7 +60,7 @@ examples here will be using it.
6060

6161
- [bs-jest on GitHub](https://github.com/glennsl/bs-jest)
6262

63-
```
63+
```bash npm2yarn
6464
npm install --save-dev @glennsl/bs-jest
6565
```
6666

docs/cypress-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Cypress Testing Library
66
[`Cypress Testing Library`][gh] allows the use of dom-testing queries within
77
[Cypress](https://cypress.io) end-to-end browser tests.
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev cypress @testing-library/cypress
1111
```
1212

docs/dom-testing-library/install.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_label: Install
77
This module is distributed via [npm][npm] which is bundled with [node][node] and
88
should be installed as one of your project's `devDependencies`:
99

10-
```
10+
```bash npm2yarn
1111
npm install --save-dev @testing-library/dom
1212
```
1313

docs/dom-testing-library/setup.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ to `jsdom` to achieve the same effect, you don't need global-jsdom.
2424

2525
First, install jsdom and global-jsdom.
2626

27-
```
27+
```bash npm2yarn
2828
npm install --save-dev jsdom global-jsdom
2929
```
3030

docs/ecosystem-bs-jest-dom.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: bs-jest-dom
88
custom DOM element matchers for Jest in [ReasonML][re] via
99
[BuckleScript][bucklescript].
1010

11-
```
11+
```bash npm2yarn
1212
npm install --save-dev bs-jest-dom
1313
```
1414

docs/ecosystem-jasmine-dom.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: jasmine-dom
66
[`jasmine-dom`][gh] is a companion library for Testing Library that provides
77
custom DOM element matchers for Jasmine
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev @testing-library/jasmine-dom
1111
```
1212

docs/ecosystem-jest-dom.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: jest-dom
66
[`jest-dom`][gh] is a companion library for Testing Library that provides custom
77
DOM element matchers for Jest
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev @testing-library/jest-dom
1111
```
1212

docs/ecosystem-jest-native.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: jest-native
88
library for `React Native Testing Library` that provides custom element matchers
99
for Jest.
1010

11-
```
11+
```bash npm2yarn
1212
npm install --save-dev @testing-library/jest-native
1313
```
1414

docs/ecosystem-query-extensions.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: query-extensions
77
Library that mixes a higher-level API into the standard `@testing-library` core
88
queries
99

10-
```
10+
```bash npm2yarn
1111
npm install --save-dev query-extensions
1212
```
1313

docs/ecosystem-react-select-event.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: react-select-event
77
that provides helper methods for interacting with [`react-select`][react-select]
88
elements.
99

10-
```
10+
```bash npm2yarn
1111
npm install --save-dev react-select-event
1212
```
1313

docs/ecosystem-riot-testing-library.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: riot-testing-library
77
[DOM Testing Library](https://github.com/testing-library/dom-testing-library) by
88
adding APIs for working with [Riot.js](https://riot.js.org/) components.
99

10-
```
10+
```bash npm2yarn
1111
npm install --save-dev riot-testing-library
1212
```
1313

docs/ecosystem-rtl-simple-queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: rtl-simple-queries
66
[`rtl-simple-queries`][gh] is a companion library for `React Testing Library`
77
that provides an alternative query API.
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev rtl-simple-queries
1111
```
1212

docs/ecosystem-testing-library-selector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: testing-library-selector
66
[`testing-library-selector`][gh] is a library for `@testing-library` that
77
provides reusable selectors. Written in typescript.
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev testing-library-selector
1111
```
1212

docs/marko-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Introduction
88
top of [`DOM Testing Library`](dom-testing-library/intro.mdx) by adding APIs for
99
working with Marko components.
1010

11-
```
11+
```bash npm2yarn
1212
npm install --save-dev @marko/testing-library
1313
```
1414

docs/nightwatch-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ in [Nightwatch](https://nightwatchjs.org) for end-to-end web testing.
1313
1414
then just
1515

16-
```
16+
```bash npm2yarn
1717
npm install -D @testing-library/nightwatch
1818
```
1919

docs/pptr-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Puppeteer Testing Library
66
[`pptr-testing-library`][gh] is a lightweight adapter allowing
77
`DOM Testing Library` to be used with [`puppeteer`][ghpuppeteer].
88

9-
```
9+
```bash npm2yarn
1010
npm install --save-dev puppeteer pptr-testing-library
1111
```
1212

docs/preact-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Introduction
88

99
[gh]: https://github.com/testing-library/preact-testing-library
1010

11-
```
11+
```bash npm2yarn
1212
npm install --save-dev @testing-library/preact
1313
```
1414

docs/react-native-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ active throughout the React Native Community.
2121

2222
## Quickstart
2323

24-
```
24+
```bash npm2yarn
2525
npm install --save-dev @testing-library/react-native
2626
```
2727

docs/react-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ APIs for working with React components.
1111
> out of the box support for **React Testing Library**. If that is not the case,
1212
> you can add it via `npm` like so:
1313
14-
```
14+
```bash npm2yarn
1515
npm install --save-dev @testing-library/react
1616
```
1717

docs/react-testing-library/migrate-from-enzyme.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ the work can be done collaboratively and spread out over time.
6767
First, install React Testing Library and the `jest-dom` helper library (you can
6868
check [this page](setup.mdx) for the complete installation and setup guide).
6969

70-
```
70+
```bash npm2yarn
7171
npm install --save-dev @testing-library/react @testing-library/jest-dom
7272
```
7373

@@ -296,7 +296,7 @@ resemble the way your software is actually used.
296296

297297
To use the `@testing-library/user-event` module, first install it:
298298

299-
```
299+
```bash npm2yarn
300300
npm install --save-dev @testing-library/user-event @testing-library/dom
301301
```
302302

docs/react-testing-library/setup.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ using Create React App without TypeScript, save this to `jsconfig.json` instead.
288288
### Jest 28
289289

290290
If you're using Jest 28 or later, jest-environment-jsdom package now must be installed separately.
291-
```
291+
```bash npm2yarn
292292
npm install --save-dev jest-environment-jsdom
293293
```
294-
294+
295295
`jsdom` is also no longer the default environment. You can enable `jsdom` globally by editing `jest.config.js`:
296296

297297
```diff title="jest.config.js"
@@ -340,7 +340,7 @@ fixes, required by React Testing Library.
340340

341341
First, install `jest-environment-jsdom-fifteen`.
342342

343-
```
343+
```bash npm2yarn
344344
npm install --save-dev jest-environment-jsdom-fifteen
345345
```
346346

@@ -369,7 +369,7 @@ browser APIs.
369369

370370
First, install `jsdom` and `global-jsdom`.
371371

372-
```
372+
```bash npm2yarn
373373
npm install --save-dev jsdom global-jsdom
374374
```
375375

docs/svelte-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Introduction
88

99
[gh]: https://github.com/testing-library/svelte-testing-library
1010

11-
```
11+
```bash npm2yarn
1212
npm install --save-dev @testing-library/svelte
1313
```
1414

docs/svelte-testing-library/setup.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ You can take a look at the [`vitest-svelte-kit` configuration docs](https://gith
101101
we need to install
102102
[svelte-jester](https://github.com/mihar-22/svelte-jester)
103103

104-
```
104+
```bash npm2yarn
105105
npm install --save-dev svelte-jester
106106
```
107107

@@ -125,7 +125,7 @@ You can take a look at the [`vitest-svelte-kit` configuration docs](https://gith
125125

126126
5.1 Install `babel-jest`
127127

128-
```bash
128+
```bash npm2yarn
129129
npm install --save-dev babel-jest
130130
```
131131

@@ -152,7 +152,7 @@ You can take a look at the [`vitest-svelte-kit` configuration docs](https://gith
152152

153153
6.1 Install `jest-dom`
154154

155-
```
155+
```bash npm2yarn
156156
npm install --save-dev @testing-library/jest-dom
157157
```
158158

@@ -167,7 +167,7 @@ You can take a look at the [`vitest-svelte-kit` configuration docs](https://gith
167167
7. Create your component + test file (checkout the rest of the docs to see how)
168168
and run it
169169

170-
```
170+
```bash npm2yarn
171171
npm run test
172172
```
173173

docs/testcafe-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you are new to the testing-library approach for writing tests, check out the
1515

1616
## Install
1717

18-
```
18+
```bash npm2yarn
1919
npm install --save-dev testcafe @testing-library/testcafe
2020
```
2121

docs/vue-testing-library/intro.mdx

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ In short, Vue Testing Library does three things:
2121
## Quickstart
2222

2323
If using Vue2
24-
```
24+
25+
```bash npm2yarn
2526
npm install --save-dev @testing-library/vue@5
2627
```
28+
2729
If using Vue3
28-
```
30+
31+
```bash npm2yarn
2932
npm install --save-dev @testing-library/vue
3033
```
3134

docs/webdriverio-testing-library/intro.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ queries in [WebdriverIO](https://webdriver.io/) for end-to-end web testing.
1313
1414
then just
1515

16-
```
16+
```bash npm2yarn
1717
npm install -D @testing-library/webdriverio
1818
```
1919

docusaurus.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ module.exports = {
212212
docs: {
213213
showLastUpdateAuthor: true,
214214
showLastUpdateTime: true,
215+
remarkPlugins: [
216+
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
217+
],
215218
editUrl:
216219
'https://github.com/testing-library/testing-library-docs/edit/main/',
217220
path: './docs',

0 commit comments

Comments
 (0)