@@ -115,7 +115,7 @@ expect.extend({toBeInTheDocument, toHaveClass})
115115` @testing-library/jest-dom ` can work with any library or framework that returns
116116DOM 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
119119querying DOM elements.
120120
121121### ` toBeDisabled `
@@ -151,7 +151,7 @@ expect(document.querySelector('[data-testid="input"]')).toBeDisabled()
151151expect (document .querySelector (' a' )).not .toBeDisabled ()
152152```
153153
154- ##### Using dom-testing-library
154+ ##### Using DOM Testing Library
155155
156156``` javascript
157157expect (getByTestId (container, ' button' )).toBeDisabled ()
@@ -196,7 +196,7 @@ expect(document.querySelector('[data-testid="empty"]').toBeEmpty()
196196expect (document .querySelector (' [data-testid="not-empty"]' ).not .toBeEmpty ()
197197` ` `
198198
199- ##### Using dom-testing-library
199+ ##### Using DOM Testing Library
200200
201201` ` ` javascript
202202expect (queryByTestId (container, ' empty' )).toBeEmpty ()
@@ -234,7 +234,7 @@ expect(nonExistantElement).not.toBeInTheDocument()
234234expect (detachedElement).not .toBeInTheDocument ()
235235` ` `
236236
237- ##### Using dom-testing-library
237+ ##### Using DOM Testing Library
238238
239239` ` ` javascript
240240expect (
@@ -286,7 +286,7 @@ expect(queryByTestId('aria-invalid-value')).toBeInvalid()
286286expect (queryByTestId (' aria-invalid-false' )).not .toBeInvalid ()
287287` ` `
288288
289- ##### Using dom-testing-library
289+ ##### Using DOM Testing Library
290290
291291` ` ` javascript
292292expect (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
355355expect (getByTestId (container, ' required-input' )).toBeRequired ()
@@ -397,7 +397,7 @@ expect(queryByTestId('aria-invalid-value')).not.toBeValid()
397397expect (queryByTestId (' aria-invalid-false' )).toBeValid ()
398398` ` `
399399
400- ##### Using dom-testing-library
400+ ##### Using DOM Testing Library
401401
402402` ` ` javascript
403403expect (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
465465expect (getByText (container, ' Zero Opacity Example' )).not .toBeVisible ()
@@ -501,7 +501,7 @@ expect(descendant).not.toContainElement(ancestor)
501501expect (ancestor).not .toContainElement (nonExistantElement)
502502` ` `
503503
504- ##### Using dom-testing-library
504+ ##### Using DOM Testing Library
505505
506506` ` ` javascript
507507const {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
546546expect (getByTestId (container, ' parent' )).toContainHTML (
@@ -588,7 +588,7 @@ expect(button).toHaveAttribute('type', 'submit')
588588expect (button).not .toHaveAttribute (' type' , ' button' )
589589` ` `
590590
591- ##### Using dom-testing-library
591+ ##### Using DOM Testing Library
592592
593593` ` ` javascript
594594const button = getByTestId (container, ' ok-button' )
@@ -638,7 +638,7 @@ expect(deleteButton).not.toHaveClass('btn-link')
638638expect (noClasses).not .toHaveClass ()
639639` ` `
640640
641- ##### Using dom-testing-library
641+ ##### Using DOM Testing Library
642642
643643` ` ` javascript
644644const deleteButton = getByTestId (container, ' delete-button' )
@@ -680,7 +680,7 @@ input.blur()
680680expect (input).not .toHaveFocus ()
681681` ` `
682682
683- ##### Using dom-testing-library
683+ ##### Using DOM Testing Library
684684
685685` ` ` javascript
686686const 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
817817const button = getByTestId (container, ' delete-button' )
@@ -866,7 +866,7 @@ expect(element).toHaveTextContent(/content$/i) // to use case-insentive match
866866expect (element).not .toHaveTextContent (' content' )
867867` ` `
868868
869- ##### Using dom-testing-library
869+ ##### Using DOM Testing Library
870870
871871` ` ` javascript
872872const element = getByTestId (container, ' text-content' )
@@ -920,7 +920,7 @@ expect(emptyInput).not.toHaveValue()
920920expect (selectInput).not .toHaveValue ([' second' , ' third' ])
921921` ` `
922922
923- ##### Using dom-testing-library
923+ ##### Using DOM Testing Library
924924
925925` ` ` javascript
926926const {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
978978The intention is to make this available to be used independently of these other
979979libraries, 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
992992This 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
997995Additionally, with respect to custom DOM matchers, this library aims to maintain
998996a 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