Skip to content

Commit 9c761ab

Browse files
committed
Update library name
1 parent 2b662d1 commit 9c761ab

File tree

19 files changed

+48
-48
lines changed

19 files changed

+48
-48
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ testing-library-docs
88
[![Code of Conduct][coc-badge]][coc]
99
<!-- prettier-ignore-end -->
1010

11-
Documentation site for [react-testing-library](https://github.com/testing-library/react-testing-library), [dom-testing-library](https://github.com/testing-library/dom-testing-library), and [related projects](https://github.com/testing-library)
11+
Documentation site for [react-testing-library](https://github.com/testing-library/react-testing-library), [DOM Testing Library](https://github.com/testing-library/dom-testing-library), and [related projects](https://github.com/testing-library)
1212

1313
See [./website/README.md](./website/README.md) for instructions on building the site
1414

docs/angular-testing-library/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ after each interaction.
7676
You can also import these event via `@angular-extensions/testing-library`, but
7777
the Angular's change detection will not be triggered automatically.
7878

79-
The same counts for all the queries provided by `dom-testing-library`, these are
79+
The same counts for all the queries provided by `DOM Testing Library`, these are
8080
also re-exported and can be imported via `@angular-extensions/testing-library`.
8181

8282
```typescript

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Bindings for several testing libraries have been ported to [ReasonML][re].
1111
`react-testing-library`.
1212

1313
[`bs-dom-testing-library`][gh-dom] contains [BuckleScript][bs] bindings for
14-
`dom-testing-library`.
14+
`DOM Testing Library`.
1515

1616
```
1717
npm install --save-dev bs-dom-testing-library

docs/cypress-testing-library/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Add this line to your project's `cypress/support/commands.js`:
2222
import 'cypress-testing-library/add-commands';
2323
```
2424

25-
You can now use all of `dom-testing-library`'s `getBy`, `getAllBy`, `queryBy`
25+
You can now use all of `DOM Testing Library`'s `getBy`, `getAllBy`, `queryBy`
2626
and `queryAllBy` commands.
27-
[See `dom-testing-library` API for reference](dom-testing-library/api-queries.md)
27+
[See `DOM Testing Library` API for reference](dom-testing-library/api-queries.md)
2828

2929
## Examples
3030

@@ -45,9 +45,9 @@ cy.get('form').then(subject => {
4545
```
4646

4747
`cypress-testing-library` supports both jQuery elements and DOM nodes. This is
48-
necessary because Cypress uses jQuery elements, while `dom-testing-library`
48+
necessary because Cypress uses jQuery elements, while `DOM Testing Library`
4949
expects DOM nodes. When you pass a jQuery element as `container`, it will get
5050
the first DOM node from the collection and use that as the `container` parameter
51-
for the `dom-testing-library` functions.
51+
for the `DOM Testing Library` functions.
5252

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

docs/dom-testing-library/api-helpers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ title: Helpers
55

66
## Custom Queries
77

8-
`dom-testing-library` exposes many of the helper functions that are used to
8+
`DOM Testing Library` exposes many of the helper functions that are used to
99
implement the default queries. You can use the helpers to build custom queries.
1010
For example, the code below shows a way to override the default `testId` queries
1111
to use a different data-attribute. (Note: test files would import
12-
`test-utils.js` instead of using `dom-testing-library` directly).
12+
`test-utils.js` instead of using `DOM Testing Library` directly).
1313

1414
```js
1515
// test-utils.js

docs/dom-testing-library/api-queries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ cy.getByTestId('username-input').should('exist')
632632
633633
#### Overriding `data-testid`
634634

635-
The `...ByTestId` functions in `dom-testing-library` use the attribute
635+
The `...ByTestId` functions in `DOM Testing Library` use the attribute
636636
`data-testid` by default, following the precedent set by
637637
[React Native Web](https://github.com/testing-library/react-testing-library/issues/1)
638638
which uses a `testID` prop to emit a `data-testid` attribute on the element, and
@@ -661,7 +661,7 @@ affect the precision of string matching:
661661

662662
### Normalization
663663

664-
Before running any matching logic against text in the DOM, `dom-testing-library`
664+
Before running any matching logic against text in the DOM, `DOM Testing Library`
665665
automatically normalizes that text. By default, normalization consists of
666666
trimming whitespace from the start and end of text, and collapsing multiple
667667
adjacent whitespace characters into a single space.

docs/dom-testing-library/cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: cheatsheet
33
title: Cheatsheet
44
---
55

6-
A short guide to all the exported functions in `dom-testing-library`
6+
A short guide to all the exported functions in `DOM Testing Library`
77

88
## Queries
99

docs/dom-testing-library/install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ 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

1010
```
11-
npm install --save-dev dom-testing-library
11+
npm install --save-dev @testing-library/dom
1212
```
1313

1414
## Wrappers
@@ -21,21 +21,21 @@ wrapper:
2121

2222
## Ecosystem
2323

24-
`dom-testing-library` works well with these companion libraries:
24+
`DOM Testing Library` works well with these companion libraries:
2525

2626
- [user-event](ecosystem-user-event.md) browser event simulation
2727
- [jest-dom](ecosystem-jest-dom.md) custom Jest matchers
2828

2929
## Main Exports
3030

3131
You can
32-
[review the `dom-testing-library` package.json here](https://unpkg.com/dom-testing-library/package.json).
32+
[review the `DOM Testing Library` package.json here](https://unpkg.com/dom-testing-library/package.json).
3333

3434
In particular, the `main`, `module`, and `umd:main` fields are useful. Each of
3535
these points to a file that's useful in certain situations. Typically, your
3636
testing framework will resolve to the correct one for your situation, but if it
3737
does not, then you can either configure your testing framework to resolve to the
38-
right file when you require/import `dom-testing-library` or you can import the
38+
right file when you require/import `@testing-library/dom` or you can import the
3939
file you need more explicitly. For example:
4040

4141
```js

docs/dom-testing-library/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ functionality) don't break your tests and slow you and your team down.
1414

1515
## This solution
1616

17-
The `dom-testing-library` is a very light-weight solution for testing DOM nodes
17+
The `DOM Testing Library` is a very light-weight solution for testing DOM nodes
1818
(whether simulated with [`JSDOM`](https://github.com/jsdom/jsdom) as provided by
1919
default with [Jest][jest] or in the browser). The main utilities it provides
2020
involve querying the DOM for nodes in a way that's similar to how the user finds
2121
elements on the page. In this way, the library helps ensure your tests give you
22-
confidence in your UI code. The `dom-testing-library`'s primary guiding
22+
confidence in your UI code. The `DOM Testing Library`'s primary guiding
2323
principle is:
2424

2525
> [The more your tests resemble the way your software is used, the more confidence they can give you.](guiding-principles.md)

docs/dom-testing-library/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ sidebar_label: Setup
55
---
66

77
If you're running your tests in the browser bundled with webpack (or similar)
8-
then `dom-testing-library` should work out of the box for you. However, most
9-
people using `dom-testing-library` are using it with
8+
then `DOM Testing Library` should work out of the box for you. However, most
9+
people using `DOM Testing Library` are using it with
1010
[the Jest testing framework](https://jestjs.io/) with the `testEnvironment` set
1111
to
1212
[`jest-environment-jsdom`](https://www.npmjs.com/package/jest-environment-jsdom)

docs/ecosystem-native-testing-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ sidebar_label: native-testing-library
55
---
66

77
Native Testing Library is a testing library for **React Native** inspired by
8-
`dom-testing-library`. Because React Native does not run in a browser
8+
`DOM Testing Library`. Because React Native does not run in a browser
99
environment, the core queries are implemented independently, unlike other
10-
wrappers that user dom-testing-library as the base. You'll find much more
10+
wrappers that use `DOM Testing Library` as the base. You'll find much more
1111
information about the library, including examples, on the project website:
1212

1313
- [Docs](https://native-testing-library.com)

docs/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ slow you and your team down.
1818

1919
## This solution
2020

21-
The core library, [`dom-testing-library`][dom], is a light-weight solution for
21+
The core library, [`DOM Testing Library`][dom], is a light-weight solution for
2222
testing web pages by querying and interacting with DOM nodes (whether simulated
2323
with [`JSDOM`][jsdom]/[Jest][jest] or in the browser). The main utilities it
2424
provides involve querying the DOM for nodes in a way that's similar to how the
@@ -36,7 +36,7 @@ is also a plugin to use testing-library queries for end-to-end tests in
3636
1. A test runner or framework
3737
2. Specific to a testing framework
3838

39-
`dom-testing-library` works with any environment that provides DOM APIs, such as
39+
`DOM Testing Library` works with any environment that provides DOM APIs, such as
4040
Jest, Mocha + JSDOM, or a real browser
4141

4242
[jest]: https://jestjs.io

docs/native-testing-library/intro.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ sidebar_label: Intro
55
---
66

77
Native Testing Library is a testing library for **React Native** inspired by
8-
`dom-testing-library`. Because React Native does not run in a browser
8+
`DOM Testing Library`. Because React Native does not run in a browser
99
environment, the core queries are implemented independently, unlike other
10-
wrappers that use `dom-testing-library` as the base. You'll find much more
10+
wrappers that use `DOM Testing Library` as the base. You'll find much more
1111
information about the library, including examples, on the project sites:
1212

1313
- [Docs][docs]
@@ -41,14 +41,14 @@ write tests using that philosophy in React Native.
4141
the testing library API as closely as possible while still accounting for the
4242
differences in the platforms. Accomplishing this is no small feat because of the
4343
differences between the two platforms. Although most framework implementations
44-
like `react-testing-library` are thin layers over `dom-testing-library`, this
44+
like `react-testing-library` are thin layers over `DOM Testing Library`, this
4545
library needed to have its own base implementation as well as a user-facing API.
4646
This library uses the
4747
[react-test-renderer](https://reactjs.org/docs/test-renderer.html), whereas
48-
`dom-testing-library` uses ReactDOM and JSDOM. The main philosophy is that you
48+
`DOM Testing Library` uses ReactDOM and JSDOM. The main philosophy is that you
4949
should find elements that are on the "screen" the way users would. This approach
5050
is meant to give you confidence that your app is working as a cohesive unit.
51-
Just like the `dom-testing-library`, `native-testing-library`'s primary guiding
51+
Just like the `DOM Testing Library`, `native-testing-library`'s primary guiding
5252
principle is:
5353

5454
> [The more your tests resemble the way your software is used, the more confidence they can give you.](guiding-principles.md)

docs/pptr-testing-library/intro.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Puppeteer Testing Library
44
---
55

66
[`pptr-testing-library`][gh] is a lightweight adapter allowing
7-
`dom-testing-library` to be used with [`puppeteer`][ghpuppeteer].
7+
`DOM Testing Library` to be used with [`puppeteer`][ghpuppeteer].
88

99
```
1010
npm install --save-dev puppeteer pptr-testing-library
@@ -35,7 +35,7 @@ await $email.type('[email protected]')
3535
await wait(() => getByText('Loading...'))
3636
```
3737

38-
A little too un-puppeteer for you? You can attach all the `dom-testing-library`
38+
A little too un-puppeteer for you? You can attach all the `DOM Testing Library`
3939
methods directly onto puppeteer's `ElementHandle` instead!
4040

4141
```js
@@ -57,21 +57,21 @@ const $email = await getByLabelText('Email')
5757

5858
### API
5959

60-
Unique methods, not part of `dom-testing-library`.
60+
Unique methods, not part of `DOM Testing Library`.
6161

6262
- `getDocument(page: puppeteer.Page): ElementHandle` - get an ElementHandle for
6363
the document
6464

6565
### Forwarded methods
6666

67-
`dom-testing-library` is injected into the page that puppeteer is controlling on
67+
`DOM Testing Library` is injected into the page that puppeteer is controlling on
6868
each query, so all results will be async. It's still recommended that you use
6969
puppeteer's built-in methods for interaction rather than `fireEvent`.
7070

7171
## Known Limitations
7272

7373
- `waitForElement` method is not exposed. Puppeteer has its own set of wait
74-
utilities that somewhat conflict with the style used in `dom-testing-library`.
74+
utilities that somewhat conflict with the style used in `DOM Testing Library`.
7575
See
7676
[the issue on GitHub](https://github.com/patrickhulce/pptr-testing-library/issues/3).
7777
- `fireEvent` method is not exposed, use puppeteer's built-ins instead.

docs/react-testing-library/api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: api
33
title: API
44
---
55

6-
`react-testing-library` re-exports everything from `dom-testing-library` as well
6+
`react-testing-library` re-exports everything from `DOM Testing Library` as well
77
as these methods:
88

99
- [`render`](#render)
@@ -94,7 +94,7 @@ for common data providers. See [setup](setup.md#custom-render) for examples.
9494

9595
### `queries`
9696

97-
Queries to bind. Overrides the default set from `dom-testing-library` unless
97+
Queries to bind. Overrides the default set from `DOM Testing Library` unless
9898
merged.
9999

100100
```js
@@ -120,7 +120,7 @@ The `render` method returns an object that has a few properties:
120120
### `...queries`
121121

122122
The most important feature of `render` is that the queries from
123-
[dom-testing-library](dom-testing-library/api-queries.md) are automatically
123+
[DOM Testing Library](dom-testing-library/api-queries.md) are automatically
124124
returned with their first argument bound to the [baseElement](#baseelement),
125125
which defaults to `document.body`.
126126

@@ -182,7 +182,7 @@ debug()
182182
```
183183

184184
This is a simple wrapper around `prettyDOM` which is also exposed and comes from
185-
[`dom-testing-library`](https://github.com/testing-library/dom-testing-library/blob/master/README.md#prettydom).
185+
[`DOM Testing Library`](https://github.com/testing-library/dom-testing-library/blob/master/README.md#prettydom).
186186

187187
### `rerender`
188188

docs/react-testing-library/cheatsheet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Cheatsheet
88
A short guide to all the exported functions in `react-testing-library`
99

1010
- **render** `const {/* */} = render(Component)` returns:
11-
- all the queries from `dom-testing-library`, bound to the document so there
11+
- all the queries from `DOM Testing Library`, bound to the document so there
1212
is no need to pass a node as the first argument
1313
- `unmount` function to unmount the component
1414
- `container` reference to the DOM node where the component is mounted
@@ -30,10 +30,10 @@ test('loads items eventually', async () => {
3030

3131
## Queries
3232

33-
> **Difference from dom-testing-library**
33+
> **Difference from DOM Testing Library**
3434
>
3535
> The queries returned from `render` in `react-testing-library` are the same as
36-
> `dom-testing-library` except they have the first argument bound to the
36+
> `DOM Testing Library` except they have the first argument bound to the
3737
> document, so instead of `getByText(node, 'text')` you do `getByText('text')`
3838
3939
See [Which query should I use?](guide-which-query.md)

docs/react-testing-library/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: React Testing Library
44
sidebar_label: Introduction
55
---
66

7-
[`react-testing-library`][gh] builds on top of `dom-testing-library` by adding
7+
[`react-testing-library`][gh] builds on top of `DOM Testing Library` by adding
88
APIs for working with React components.
99

1010
```
@@ -61,7 +61,7 @@ facilitate testing implementation details). Read more about this in
6161
[Using Without Jest](./setup#using-without-jest))
6262

6363
> NOTE: This library is built on top of
64-
> [`dom-testing-library`](dom-testing-library/intro.md) which is where most of
64+
> [`DOM Testing Library`](dom-testing-library/intro.md) which is where most of
6565
> the logic behind the queries is.
6666
6767
## Video

docs/testcafe-testing-library/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fixture`selectors`.beforeEach(addTestcafeTestingLibrary)
3232

3333
You can now import & use `getBy`, `getAllBy`, `queryBy` and `queryAllBy`
3434
selectors in your tests.
35-
[See `dom-testing-library` API for reference](dom-testing-library/api-queries.md)
35+
[See `DOM Testing Library` API for reference](dom-testing-library/api-queries.md)
3636

3737
## Examples
3838

docs/vue-testing-library/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Vue Testing Library
44
---
55

66
[`vue-testing-library`][gh] is a lightweight adapter allowing
7-
`dom-testing-library` to be used to test [Vue](https://vuejs.org/) components
7+
`DOM Testing Library` to be used to test [Vue](https://vuejs.org/) components
88
built on top of `@vue/test-utils`.
99

1010
```
@@ -89,7 +89,7 @@ test('should render HelloWorld', () => {
8989
})
9090
```
9191

92-
You can now use all of `dom-testing-library`'s `getBy`, `getAllBy`, `queryBy`
92+
You can now use all of `DOM Testing Library`'s `getBy`, `getAllBy`, `queryBy`
9393
and `queryAllBy` commands. See [here](dom-testing-library/api-queries.md) for
9494
usage.
9595

@@ -113,9 +113,9 @@ helper methods
113113
3. configurationCb - A callback to be called passing the Vue instance when
114114
created. This allows 3rd party plugins to be installed prior to mount.
115115

116-
### Forwarded methods from dom-testing-library
116+
### Forwarded methods from DOM Testing Library
117117

118-
vue-testing-library forwards all exports from dom-testing-library but it alters
118+
vue-testing-library forwards all exports from `DOM Testing Library` but it alters
119119
`fireEvent` so that all events are async (ie: `await fireEvent.click(button)`)
120120

121121
In particular, the `wait` utility can be very important in Vue components,

0 commit comments

Comments
 (0)