From f7e298fec3e455a96f1ab2c5ae1ff372558c16c0 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 20 Dec 2023 15:39:53 -0800 Subject: [PATCH] docs: clarify toPass timeout behavior (#28747) Fixes https://github.com/microsoft/playwright/issues/28744 --- docs/src/test-assertions-js.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/test-assertions-js.md b/docs/src/test-assertions-js.md index d05b7a750a..7db1f9c141 100644 --- a/docs/src/test-assertions-js.md +++ b/docs/src/test-assertions-js.md @@ -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.