Skip to content

noPlaywrightPagePause (JavaScript)

Language JavaScript (and super languages)
biome.json
{
"linter": {
"rules": {
"suspicious": {
"noPlaywrightPagePause": "error"
}
}
}
}

Disallow using page.pause().

Playwright’s page.pause() is a debugging utility that should not be committed to version control. It pauses test execution and opens the Playwright Inspector, which is useful during development but should not be present in production test code.

await page.pause();
code-block.js:1:7 lint/suspicious/noPlaywrightPagePause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ Unexpected use of page.pause().

> 1 │ await page.pause();
│ ^^^^^^^^^^^^
2 │

ℹ page.pause() is a debugging utility and should not be committed to version control.

ℹ Remove the pause() call or use a proper debugging strategy.

test('example', async ({ page }) => {
await page.click('button');
await page.pause();
});
code-block.js:3:11 lint/suspicious/noPlaywrightPagePause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠ Unexpected use of page.pause().

1 │ test('example', async ({ page }) => {
2 │ await page.click('button');
> 3 │ await page.pause();
│ ^^^^^^^^^^^^
4 │ });
5 │

ℹ page.pause() is a debugging utility and should not be committed to version control.

ℹ Remove the pause() call or use a proper debugging strategy.

test('example', async ({ page }) => {
await page.click('button');
await expect(page.locator('.result')).toBeVisible();
});