Skip to content

Commit c975afb

Browse files
afontcugnapse
authored andcommitted
docs: Update DTL library name + links (#121)
1 parent 1d2b461 commit c975afb

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ expect.extend({toBeInTheDocument, toHaveClass})
115115
`@testing-library/jest-dom` can work with any library or framework that returns
116116
DOM elements from queries. The custom matcher examples below demonstrate using
117117
`document.querySelector` and
118-
[dom-testing-library](https://github.com/kentcdodds/dom-testing-library) for
118+
[DOM Testing Library](https://github.com/testing-library/dom-testing-library) for
119119
querying DOM elements.
120120

121121
### `toBeDisabled`
@@ -151,7 +151,7 @@ expect(document.querySelector('[data-testid="input"]')).toBeDisabled()
151151
expect(document.querySelector('a')).not.toBeDisabled()
152152
```
153153

154-
##### Using dom-testing-library
154+
##### Using DOM Testing Library
155155

156156
```javascript
157157
expect(getByTestId(container, 'button')).toBeDisabled()
@@ -196,7 +196,7 @@ expect(document.querySelector('[data-testid="empty"]').toBeEmpty()
196196
expect(document.querySelector('[data-testid="not-empty"]').not.toBeEmpty()
197197
```
198198
199-
##### Using dom-testing-library
199+
##### Using DOM Testing Library
200200
201201
```javascript
202202
expect(queryByTestId(container, 'empty')).toBeEmpty()
@@ -234,7 +234,7 @@ expect(nonExistantElement).not.toBeInTheDocument()
234234
expect(detachedElement).not.toBeInTheDocument()
235235
```
236236
237-
##### Using dom-testing-library
237+
##### Using DOM Testing Library
238238
239239
```javascript
240240
expect(
@@ -286,7 +286,7 @@ expect(queryByTestId('aria-invalid-value')).toBeInvalid()
286286
expect(queryByTestId('aria-invalid-false')).not.toBeInvalid()
287287
```
288288
289-
##### Using dom-testing-library
289+
##### Using DOM Testing Library
290290
291291
```javascript
292292
expect(getByTestId(container, 'no-aria-invalid')).not.toBeInvalid()
@@ -349,7 +349,7 @@ expect(
349349
).toBeRequired()
350350
```
351351
352-
##### Using dom-testing-library
352+
##### Using DOM Testing Library
353353
354354
```javascript
355355
expect(getByTestId(container, 'required-input')).toBeRequired()
@@ -397,7 +397,7 @@ expect(queryByTestId('aria-invalid-value')).not.toBeValid()
397397
expect(queryByTestId('aria-invalid-false')).toBeValid()
398398
```
399399
400-
##### Using dom-testing-library
400+
##### Using DOM Testing Library
401401
402402
```javascript
403403
expect(getByTestId(container, 'no-aria-invalid')).toBeValid()
@@ -459,7 +459,7 @@ expect(
459459
).not.toBeVisible()
460460
```
461461
462-
##### Using dom-testing-library
462+
##### Using DOM Testing Library
463463
464464
```javascript
465465
expect(getByText(container, 'Zero Opacity Example')).not.toBeVisible()
@@ -501,7 +501,7 @@ expect(descendant).not.toContainElement(ancestor)
501501
expect(ancestor).not.toContainElement(nonExistantElement)
502502
```
503503
504-
##### Using dom-testing-library
504+
##### Using DOM Testing Library
505505
506506
```javascript
507507
const {queryByTestId} = render(/* Rendered HTML */)
@@ -540,7 +540,7 @@ expect(document.querySelector('[data-testid="parent"]')).toContainHTML(
540540
)
541541
```
542542
543-
##### Using dom-testing-library
543+
##### Using DOM Testing Library
544544
545545
```javascript
546546
expect(getByTestId(container, 'parent')).toContainHTML(
@@ -588,7 +588,7 @@ expect(button).toHaveAttribute('type', 'submit')
588588
expect(button).not.toHaveAttribute('type', 'button')
589589
```
590590
591-
##### Using dom-testing-library
591+
##### Using DOM Testing Library
592592
593593
```javascript
594594
const button = getByTestId(container, 'ok-button')
@@ -638,7 +638,7 @@ expect(deleteButton).not.toHaveClass('btn-link')
638638
expect(noClasses).not.toHaveClass()
639639
```
640640
641-
##### Using dom-testing-library
641+
##### Using DOM Testing Library
642642
643643
```javascript
644644
const deleteButton = getByTestId(container, 'delete-button')
@@ -680,7 +680,7 @@ input.blur()
680680
expect(input).not.toHaveFocus()
681681
```
682682
683-
##### Using dom-testing-library
683+
##### Using DOM Testing Library
684684
685685
```javascript
686686
const input = queryByTestId(container, 'element-to-focus')
@@ -811,7 +811,7 @@ expect(button).not.toHaveStyle(`
811811
`)
812812
```
813813
814-
##### Using dom-testing-library
814+
##### Using DOM Testing Library
815815
816816
```javascript
817817
const button = getByTestId(container, 'delete-button')
@@ -866,7 +866,7 @@ expect(element).toHaveTextContent(/content$/i) // to use case-insentive match
866866
expect(element).not.toHaveTextContent('content')
867867
```
868868
869-
##### Using dom-testing-library
869+
##### Using DOM Testing Library
870870
871871
```javascript
872872
const element = getByTestId(container, 'text-content')
@@ -920,7 +920,7 @@ expect(emptyInput).not.toHaveValue()
920920
expect(selectInput).not.toHaveValue(['second', 'third'])
921921
```
922922
923-
##### Using dom-testing-library
923+
##### Using DOM Testing Library
924924
925925
```javascript
926926
const {getByTestId} = render(/* Rendered HTML */)
@@ -972,8 +972,8 @@ expect(document.querySelector('.cancel-button')).toBeTruthy()
972972
973973
## Inspiration
974974
975-
This whole library was extracted out of Kent C. Dodds' [dom-testing-library][],
976-
which was in turn extracted out of [react-testing-library][].
975+
This whole library was extracted out of Kent C. Dodds' [DOM Testing Library][],
976+
which was in turn extracted out of [React Testing Library][].
977977
978978
The intention is to make this available to be used independently of these other
979979
libraries, and also to make it more clear that these other libraries are
@@ -990,9 +990,7 @@ here!
990990
> confidence they can give you.][guiding-principle]
991991
992992
This library follows the same guiding principles as its mother library
993-
[dom-testing-library][]. Go
994-
[check them out](https://github.com/kentcdodds/dom-testing-library#guiding-principles)
995-
for more details.
993+
[DOM Testing Library][]. Go [check them out][guiding-principle] for more details.
996994
997995
Additionally, with respect to custom DOM matchers, this library aims to maintain
998996
a minimal but useful set of them, while avoiding bloating itself with merely
@@ -1093,4 +1091,4 @@ MIT
10931091
https://img.shields.io/twitter/url/https/github.com/testing-library/jest-dom.svg?style=social
10941092
[emojis]: https://allcontributors.org/docs/en/emoji-key
10951093
[all-contributors]: https://github.com/all-contributors/all-contributors
1096-
[guiding-principle]: https://twitter.com/kentcdodds/status/977018512689455106
1094+
[guiding-principle]: https://testing-library.com/docs/guiding-principles

0 commit comments

Comments
 (0)