fix: await expect.poll in docs (#13743)
This commit is contained in:
parent
97750ccf9a
commit
416b56a0c8
|
|
@ -103,7 +103,7 @@ You can convert any synchronous `expect` to an asynchronous polling one using `e
|
||||||
The following method will poll given function until it returns HTTP status 200:
|
The following method will poll given function until it returns HTTP status 200:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
expect.poll(async () => {
|
await expect.poll(async () => {
|
||||||
const response = await page.request.get('https://api.example.com');
|
const response = await page.request.get('https://api.example.com');
|
||||||
return response.status();
|
return response.status();
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue