TEST009warningPro

playwright-wait-for-timeout

waitForTimeout() in tests waits for arbitrary time instead of content/state.

Applies to: JavaScript, TypeScript

Why this matters

waitForTimeout() is a code smell in Playwright tests. It makes tests slow and flaky — if the system is faster than expected, the test wastes time; if slower, it fails intermittently. Use waitForSelector, expect(...).toBeVisible(), or other content-based waits instead.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, TEST009 includedstablestack explain TEST009

TEST009 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: TEST009