コンテンツにスキップ

noPlaywrightPagePause

このコンテンツはまだ日本語訳がありません。

biome.json
{
"linter": {
"rules": {
"nursery": {
"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/nursery/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.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

test('example', async ({ page }) => {
await page.click('button');
await page.pause();
});
code-block.js:3:11 lint/nursery/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.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

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