Skip to content

feat: convert npm to yarn commands on docs #784

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

Merged
merged 2 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/angular-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ builds on top of
[`DOM Testing Library`](https://github.com/testing-library/dom-testing-library)
by adding APIs for working with Angular components.

```bash
```bash npm2yarn
npm install --save-dev @testing-library/angular
```

Expand Down
6 changes: 3 additions & 3 deletions docs/bs-react-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Bindings for several testing libraries have been ported to [ReasonML][re].
[`bs-dom-testing-library`][gh-dom] contains [BuckleScript][bs] bindings for
`DOM Testing Library`.

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

```
```bash npm2yarn
npm install --save-dev bs-platform
```

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

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

```
```bash npm2yarn
npm install --save-dev @glennsl/bs-jest
```

Expand Down
2 changes: 1 addition & 1 deletion docs/cypress-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Cypress Testing Library
[`Cypress Testing Library`][gh] allows the use of dom-testing queries within
[Cypress](https://cypress.io) end-to-end browser tests.

```
```bash npm2yarn
npm install --save-dev cypress @testing-library/cypress
```

Expand Down
2 changes: 1 addition & 1 deletion docs/dom-testing-library/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: Install
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's `devDependencies`:

```
```bash npm2yarn
npm install --save-dev @testing-library/dom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/dom-testing-library/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ to `jsdom` to achieve the same effect, you don't need global-jsdom.

First, install jsdom and global-jsdom.

```
```bash npm2yarn
npm install --save-dev jsdom global-jsdom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-bs-jest-dom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: bs-jest-dom
custom DOM element matchers for Jest in [ReasonML][re] via
[BuckleScript][bucklescript].

```
```bash npm2yarn
npm install --save-dev bs-jest-dom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-jasmine-dom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: jasmine-dom
[`jasmine-dom`][gh] is a companion library for Testing Library that provides
custom DOM element matchers for Jasmine

```
```bash npm2yarn
npm install --save-dev @testing-library/jasmine-dom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-jest-dom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: jest-dom
[`jest-dom`][gh] is a companion library for Testing Library that provides custom
DOM element matchers for Jest

```
```bash npm2yarn
npm install --save-dev @testing-library/jest-dom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-jest-native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: jest-native
library for `React Native Testing Library` that provides custom element matchers
for Jest.

```
```bash npm2yarn
npm install --save-dev @testing-library/jest-native
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-query-extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: query-extensions
Library that mixes a higher-level API into the standard `@testing-library` core
queries

```
```bash npm2yarn
npm install --save-dev query-extensions
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-react-select-event.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: react-select-event
that provides helper methods for interacting with [`react-select`][react-select]
elements.

```
```bash npm2yarn
npm install --save-dev react-select-event
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-riot-testing-library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: riot-testing-library
[DOM Testing Library](https://github.com/testing-library/dom-testing-library) by
adding APIs for working with [Riot.js](https://riot.js.org/) components.

```
```bash npm2yarn
npm install --save-dev riot-testing-library
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-rtl-simple-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: rtl-simple-queries
[`rtl-simple-queries`][gh] is a companion library for `React Testing Library`
that provides an alternative query API.

```
```bash npm2yarn
npm install --save-dev rtl-simple-queries
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem-testing-library-selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: testing-library-selector
[`testing-library-selector`][gh] is a library for `@testing-library` that
provides reusable selectors. Written in typescript.

```
```bash npm2yarn
npm install --save-dev testing-library-selector
```

Expand Down
2 changes: 1 addition & 1 deletion docs/marko-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Introduction
top of [`DOM Testing Library`](dom-testing-library/intro.mdx) by adding APIs for
working with Marko components.

```
```bash npm2yarn
npm install --save-dev @marko/testing-library
```

Expand Down
2 changes: 1 addition & 1 deletion docs/nightwatch-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in [Nightwatch](https://nightwatchjs.org) for end-to-end web testing.

then just

```
```bash npm2yarn
npm install -D @testing-library/nightwatch
```

Expand Down
2 changes: 1 addition & 1 deletion docs/pptr-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Puppeteer Testing Library
[`pptr-testing-library`][gh] is a lightweight adapter allowing
`DOM Testing Library` to be used with [`puppeteer`][ghpuppeteer].

```
```bash npm2yarn
npm install --save-dev puppeteer pptr-testing-library
```

Expand Down
2 changes: 1 addition & 1 deletion docs/preact-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Introduction

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

```
```bash npm2yarn
npm install --save-dev @testing-library/preact
```

Expand Down
2 changes: 1 addition & 1 deletion docs/react-native-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ active throughout the React Native Community.

## Quickstart

```
```bash npm2yarn
npm install --save-dev @testing-library/react-native
```

Expand Down
2 changes: 1 addition & 1 deletion docs/react-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ APIs for working with React components.
> out of the box support for **React Testing Library**. If that is not the case,
> you can add it via `npm` like so:

```
```bash npm2yarn
npm install --save-dev @testing-library/react
```

Expand Down
4 changes: 2 additions & 2 deletions docs/react-testing-library/migrate-from-enzyme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ the work can be done collaboratively and spread out over time.
First, install React Testing Library and the `jest-dom` helper library (you can
check [this page](setup.mdx) for the complete installation and setup guide).

```
```bash npm2yarn
npm install --save-dev @testing-library/react @testing-library/jest-dom
```

Expand Down Expand Up @@ -296,7 +296,7 @@ resemble the way your software is actually used.

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

```
```bash npm2yarn
npm install --save-dev @testing-library/user-event @testing-library/dom
```

Expand Down
8 changes: 4 additions & 4 deletions docs/react-testing-library/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ using Create React App without TypeScript, save this to `jsconfig.json` instead.
### Jest 28

If you're using Jest 28 or later, jest-environment-jsdom package now must be installed separately.
```
```bash npm2yarn
npm install --save-dev jest-environment-jsdom
```

`jsdom` is also no longer the default environment. You can enable `jsdom` globally by editing `jest.config.js`:

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

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

```
```bash npm2yarn
npm install --save-dev jest-environment-jsdom-fifteen
```

Expand Down Expand Up @@ -369,7 +369,7 @@ browser APIs.

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

```
```bash npm2yarn
npm install --save-dev jsdom global-jsdom
```

Expand Down
2 changes: 1 addition & 1 deletion docs/svelte-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Introduction

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

```
```bash npm2yarn
npm install --save-dev @testing-library/svelte
```

Expand Down
8 changes: 4 additions & 4 deletions docs/svelte-testing-library/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ You can take a look at the [`vitest-svelte-kit` configuration docs](https://gith
we need to install
[svelte-jester](https://github.com/mihar-22/svelte-jester)

```
```bash npm2yarn
npm install --save-dev svelte-jester
```

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

5.1 Install `babel-jest`

```bash
```bash npm2yarn
npm install --save-dev babel-jest
```

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

6.1 Install `jest-dom`

```
```bash npm2yarn
npm install --save-dev @testing-library/jest-dom
```

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

```
```bash npm2yarn
npm run test
```

Expand Down
2 changes: 1 addition & 1 deletion docs/testcafe-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you are new to the testing-library approach for writing tests, check out the

## Install

```
```bash npm2yarn
npm install --save-dev testcafe @testing-library/testcafe
```

Expand Down
7 changes: 5 additions & 2 deletions docs/vue-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ In short, Vue Testing Library does three things:
## Quickstart

If using Vue2
```

```bash npm2yarn
npm install --save-dev @testing-library/vue@5
```

If using Vue3
```

```bash npm2yarn
npm install --save-dev @testing-library/vue
```

Expand Down
2 changes: 1 addition & 1 deletion docs/webdriverio-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ queries in [WebdriverIO](https://webdriver.io/) for end-to-end web testing.

then just

```
```bash npm2yarn
npm install -D @testing-library/webdriverio
```

Expand Down
3 changes: 3 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ module.exports = {
docs: {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
],
editUrl:
'https://github.com/testing-library/testing-library-docs/edit/main/',
path: './docs',
Expand Down
Loading