noPlaywrightPagePause
Ta treść nie jest jeszcze dostępna w Twoim języku.
Summary
Section titled “Summary”- Rule available since:
v2.4.2 - Diagnostic Category:
lint/nursery/noPlaywrightPagePause - This rule doesn’t have a fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
- Sources:
- Same as
playwright/no-page-pause
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noPlaywrightPagePause": "error" } } }}Description
Section titled “Description”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.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”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();});Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.