src/content/docs/linter/rules/no-playwright-page-pause.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.4.2` - Diagnostic Category: [`lint/nursery/noPlaywrightPagePause`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - This rule belongs to the following domains: - [`playwright`](/linter/domains#playwright) - Sources: - Same as [`playwright/no-page-pause`](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-page-pause.md){
"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();
test('example', async ({ page }) => {
await page.click('button');
await page.pause();
});
test('example', async ({ page }) => {
await page.click('button');
await expect(page.locator('.result')).toBeVisible();
});