Skip to content

Commit 1a5ba09

Browse files
committed
Sync docs with latest dom-testing-library
1 parent e5fcd43 commit 1a5ba09

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

docs/dom-testing-library/example-intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
queryByTestId,
1515
// Tip: all queries are also exposed on an object
1616
// called "queries" which you could import here as well
17-
wait,
17+
waitFor,
1818
} from '@testing-library/dom'
1919
// adds special assertions like toHaveTextContent
2020
import '@testing-library/jest-dom/extend-expect'
@@ -57,7 +57,7 @@ test('examples of some things', async () => {
5757
// Get elements by their text, just like a real user does.
5858
getByText(container, 'Print Username').click()
5959

60-
await wait(() =>
60+
await waitFor(() =>
6161
expect(queryByTestId(container, 'printed-username')).toBeTruthy()
6262
)
6363

docs/example-react-router.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,3 @@ test('rendering a component that uses withRouter', () => {
137137
expect(getByTestId('location-display')).toHaveTextContent(route)
138138
})
139139
```
140-

docs/pptr-testing-library/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const $email = await getByLabelText($form, 'Email')
3232
// interact with puppeteer like usual
3333
await $email.type('pptr@example.com')
3434
// waiting works too!
35-
await wait(() => getByText('Loading...'))
35+
await waitFor(() => getByText('Loading...'))
3636
```
3737

3838
A little too un-puppeteer for you? You can attach all the `DOM Testing Library`

docs/preact-testing-library/example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function HiddenMessage({ children }) {
3131
## Test
3232

3333
```jsx
34-
// NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required.
34+
// NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required.
3535
import '@testing-library/jest-dom/extend-expect'
3636

3737
import { h } from 'preact'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import React from 'react'
5050
// import react-testing methods
5151
import { render, fireEvent, waitFor, screen } from '@testing-library/react'
5252

53-
// add custom jest matchers from jest-dom
53+
// add custom jest matchers from jest-dom
5454
import '@testing-library/jest-dom/extend-expect'
5555
import axiosMock from 'axios'
5656
// the component to test

docs/svelte-testing-library/example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sidebar_label: Example
2525
## Test
2626

2727
```js
28-
// NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required.
28+
// NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required.
2929
import '@testing-library/jest-dom/extend-expect'
3030

3131
import { render, fireEvent } from '@testing-library/svelte'

0 commit comments

Comments
 (0)