docs: clarify toPass timeout behavior (#28747)

Fixes https://github.com/microsoft/playwright/issues/28744
This commit is contained in:
Yury Semikhatsky 2023-12-20 15:39:53 -08:00 committed by GitHub
parent 87ca45366b
commit f7e298fec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,7 +223,7 @@ await expect(async () => {
}).toPass();
```
You can also specify custom timeout for retry intervals:
You can also specify custom timeout and retry intervals:
```js
await expect(async () => {
@ -237,6 +237,8 @@ await expect(async () => {
});
```
Note that by default `toPass` has timeout 0 and does not respect custom [expect timeout](./test-timeouts.md#expect-timeout).
## Add custom matchers using expect.extend
You can extend Playwright assertions by providing custom matchers. These matchers will be available on the `expect` object.