Skip to content

Commit c945833

Browse files
authored
replace wait with waitFor for puppeteer (#557)
1 parent dcf308c commit c945833

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pptr-testing-library/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ npm install --save-dev puppeteer pptr-testing-library
1616

1717
```js
1818
const puppeteer = require('puppeteer')
19-
const { getDocument, queries, wait } = require('pptr-testing-library')
19+
const { getDocument, queries, waitFor } = require('pptr-testing-library')
2020

2121
const { getByTestId, getByLabelText } = queries
2222

@@ -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`

0 commit comments

Comments
 (0)