When retrying an action or a series of actions, I often use expect(async () => ...).toPass(). However, it would be useful to have a rule that warns or shows an error if .toPass() is used without explicitly defining a timeout. The Playwright documentation notes that:
By default, .toPass() has a timeout of 0 and does not respect the custom [expect timeout](https://playwright.dev/docs/test-timeouts#expect-timeout).
This behavior can lead to unwanted delays, as the default timeout of 0 may cause tests to wait until the test's overall timeout, rather than failing early as expected.
Playwright Documentation:
.toPass() Assertion