mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	docs: make ts snippets esm-friendly (#14451)
This commit is contained in:
		
							parent
							
								
									cac13c248b
								
							
						
					
					
						commit
						f724fa570f
					
				@ -48,7 +48,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    channel: 'chrome',
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  forbidOnly: !!process.env.CI,
 | 
			
		||||
 | 
			
		||||
@ -752,7 +752,7 @@ To launch a server during the tests, use the [`webServer`](./test-advanced#launc
 | 
			
		||||
 | 
			
		||||
```ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  webServer: {
 | 
			
		||||
    command: 'npm run start', // command to launch
 | 
			
		||||
 | 
			
		||||
@ -15,7 +15,7 @@ Here is an example that defines a common timeout and two projects. The "Smoke" p
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  timeout: 60000, // Timeout is shared between all tests.
 | 
			
		||||
  projects: [
 | 
			
		||||
@ -152,7 +152,7 @@ It is also recommended to specify [`property: TestOptions.baseURL`] in the confi
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  webServer: {
 | 
			
		||||
    command: 'npm run start',
 | 
			
		||||
@ -269,7 +269,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalSetup: require.resolve('./global-setup'),
 | 
			
		||||
@ -392,7 +392,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  projects: [
 | 
			
		||||
@ -430,7 +430,7 @@ Here is an example that runs projects with different tests and configurations. T
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  timeout: 60000, // Timeout is shared between all tests.
 | 
			
		||||
  projects: [
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ GitHub API requires authorization, so we'll configure the token once for all tes
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
 | 
			
		||||
@ -601,7 +601,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import { Options } from './my-test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig<Options> = {
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  timeout: 30000,
 | 
			
		||||
@ -69,7 +69,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  expect: {
 | 
			
		||||
@ -101,7 +101,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  forbidOnly: !!process.env.CI,
 | 
			
		||||
@ -138,7 +138,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalSetup: './global-setup',
 | 
			
		||||
@ -167,7 +167,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalTeardown: './global-teardown',
 | 
			
		||||
@ -194,7 +194,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalTimeout: process.env.CI ? 60 * 60 * 1000 : undefined,
 | 
			
		||||
@ -239,7 +239,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  maxFailures: process.env.CI ? 1 : 0,
 | 
			
		||||
@ -276,7 +276,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  outputDir: './test-results',
 | 
			
		||||
@ -371,7 +371,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: 'line',
 | 
			
		||||
@ -407,7 +407,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  retries: 2,
 | 
			
		||||
@ -479,7 +479,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  testDir: './tests/playwright',
 | 
			
		||||
@ -508,7 +508,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  testIgnore: '**/test-assets/**',
 | 
			
		||||
@ -537,7 +537,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  testMatch: /.*\.e2e\.js/,
 | 
			
		||||
@ -566,7 +566,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  timeout: 5 * 60 * 1000,
 | 
			
		||||
@ -605,7 +605,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
@ -640,7 +640,7 @@ It is also recommended to specify [`property: TestOptions.baseURL`] in the confi
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  webServer: {
 | 
			
		||||
    command: 'npm run start',
 | 
			
		||||
@ -718,7 +718,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  workers: 3,
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    headless: false,
 | 
			
		||||
@ -85,7 +85,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Options shared for all projects.
 | 
			
		||||
@ -298,7 +298,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  projects: [
 | 
			
		||||
@ -391,7 +391,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  projects: [
 | 
			
		||||
 | 
			
		||||
@ -109,7 +109,7 @@ Register global setup script in the Playwright configuration file:
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalSetup: require.resolve('./global-setup'),
 | 
			
		||||
 | 
			
		||||
@ -34,7 +34,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    headless: false,
 | 
			
		||||
@ -145,7 +145,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    baseURL: 'http://localhost:3000',
 | 
			
		||||
@ -188,7 +188,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  projects: [
 | 
			
		||||
@ -272,7 +272,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  projects: [
 | 
			
		||||
@ -327,7 +327,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    locale: 'fr-FR',
 | 
			
		||||
@ -435,7 +435,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    screenshot: 'only-on-failure',
 | 
			
		||||
@ -469,7 +469,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    video: 'on-first-retry',
 | 
			
		||||
@ -503,7 +503,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    trace: 'retain-on-failure',
 | 
			
		||||
@ -532,7 +532,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
    launchOptions: {
 | 
			
		||||
@ -593,7 +593,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Look for test files in the "tests" directory, relative to this configuration file
 | 
			
		||||
 | 
			
		||||
@ -592,7 +592,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import { MyOptions } from './my-test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig<MyOptions> = {
 | 
			
		||||
 | 
			
		||||
@ -47,7 +47,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Limit the number of workers on CI, use default locally
 | 
			
		||||
@ -104,7 +104,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  fullyParallel: true,
 | 
			
		||||
@ -214,7 +214,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Limit the number of failures on CI to save resources
 | 
			
		||||
@ -318,7 +318,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  workers: 1,
 | 
			
		||||
 | 
			
		||||
@ -112,7 +112,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import { TestOptions } from './my-test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig<TestOptions> = {
 | 
			
		||||
@ -243,7 +243,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
@ -295,7 +295,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import dotenv from 'dotenv';
 | 
			
		||||
import path from 'path';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: './my-awesome-reporter.ts',
 | 
			
		||||
 | 
			
		||||
@ -30,7 +30,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: 'line',
 | 
			
		||||
@ -59,7 +59,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: [
 | 
			
		||||
@ -89,7 +89,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Concise 'dot' for CI, default 'list' when running locally
 | 
			
		||||
@ -124,7 +124,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: 'list',
 | 
			
		||||
@ -171,7 +171,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: 'line',
 | 
			
		||||
@ -215,7 +215,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: 'dot',
 | 
			
		||||
@ -256,7 +256,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: [ ['html', { open: 'never' }] ],
 | 
			
		||||
@ -282,7 +282,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: [ ['html', { outputFolder: 'my-report' }] ],
 | 
			
		||||
@ -338,7 +338,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: [ ['json', { outputFile: 'results.json' }] ],
 | 
			
		||||
@ -381,7 +381,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: [ ['junit', { outputFile: 'results.xml' }] ],
 | 
			
		||||
@ -411,7 +411,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'
 | 
			
		||||
@ -491,7 +491,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  reporter: './my-awesome-reporter.ts',
 | 
			
		||||
 | 
			
		||||
@ -85,7 +85,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  // Give failing tests 3 retry attempts
 | 
			
		||||
 | 
			
		||||
@ -103,7 +103,7 @@ module.exports = {
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  expect: {
 | 
			
		||||
    toHaveScreenshot: { maxDiffPixels: 100 },
 | 
			
		||||
 | 
			
		||||
@ -48,7 +48,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  timeout: 5 * 60 * 1000,
 | 
			
		||||
@ -146,7 +146,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  expect: {
 | 
			
		||||
@ -210,7 +210,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  use: {
 | 
			
		||||
@ -271,7 +271,7 @@ module.exports = config;
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
// playwright.config.ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  globalTimeout: 60 * 60 * 1000,
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ module.exports = config;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```js js-flavor=ts
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
const config: PlaywrightTestConfig = {
 | 
			
		||||
  retries: 1,
 | 
			
		||||
  use: {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
/* eslint-disable notice/notice */
 | 
			
		||||
 | 
			
		||||
import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * See https://playwright.dev/docs/test-configuration.
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
/* eslint-disable notice/notice */
 | 
			
		||||
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * See https://playwright.dev/docs/test-configuration.
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
/* eslint-disable notice/notice */
 | 
			
		||||
 | 
			
		||||
import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * See https://playwright.dev/docs/test-configuration.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										76
									
								
								packages/playwright-test/types/test.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										76
									
								
								packages/playwright-test/types/test.d.ts
									
									
									
									
										vendored
									
									
								
							@ -44,7 +44,7 @@ type UseOptions<TestArgs, WorkerArgs> = { [K in keyof WorkerArgs]?: WorkerArgs[K
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -98,7 +98,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -132,7 +132,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -264,7 +264,7 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -343,7 +343,7 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -376,7 +376,7 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -401,7 +401,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   reporter: 'line',
 | 
			
		||||
@ -430,7 +430,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   webServer: {
 | 
			
		||||
   *     command: 'npm run start',
 | 
			
		||||
@ -464,7 +464,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   expect: {
 | 
			
		||||
@ -556,7 +556,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   forbidOnly: !!process.env.CI,
 | 
			
		||||
@ -584,7 +584,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalSetup: './global-setup',
 | 
			
		||||
@ -603,7 +603,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTeardown: './global-teardown',
 | 
			
		||||
@ -621,7 +621,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTimeout: process.env.CI ? 60 * 60 * 1000 : undefined,
 | 
			
		||||
@ -657,7 +657,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   maxFailures: process.env.CI ? 1 : 0,
 | 
			
		||||
@ -684,7 +684,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   outputDir: './test-results',
 | 
			
		||||
@ -777,7 +777,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   retries: 2,
 | 
			
		||||
@ -810,7 +810,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testDir: './tests/playwright',
 | 
			
		||||
@ -829,7 +829,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testIgnore: '**\/test-assets/**',
 | 
			
		||||
@ -848,7 +848,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testMatch: /.*\.e2e\.js/,
 | 
			
		||||
@ -868,7 +868,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   timeout: 5 * 60 * 1000,
 | 
			
		||||
@ -901,7 +901,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   workers: 3,
 | 
			
		||||
@ -922,7 +922,7 @@ interface TestConfig {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -946,7 +946,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   use: {
 | 
			
		||||
@ -972,7 +972,7 @@ export type Metadata = { [key: string]: any };
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -992,7 +992,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   forbidOnly: !!process.env.CI,
 | 
			
		||||
@ -1018,7 +1018,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalSetup: './global-setup',
 | 
			
		||||
@ -1036,7 +1036,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTeardown: './global-teardown',
 | 
			
		||||
@ -1053,7 +1053,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTimeout: process.env.CI ? 60 * 60 * 1000 : undefined,
 | 
			
		||||
@ -1086,7 +1086,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   maxFailures: process.env.CI ? 1 : 0,
 | 
			
		||||
@ -1125,7 +1125,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   reporter: 'line',
 | 
			
		||||
@ -1174,7 +1174,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   workers: 3,
 | 
			
		||||
@ -1203,7 +1203,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   webServer: {
 | 
			
		||||
   *     command: 'npm run start',
 | 
			
		||||
@ -2414,7 +2414,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import { Options } from './my-test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig<Options> = {
 | 
			
		||||
@ -2489,7 +2489,7 @@ type ConnectOptions = {
 | 
			
		||||
 * [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   use: {
 | 
			
		||||
 *     headless: false,
 | 
			
		||||
@ -2524,7 +2524,7 @@ export interface PlaywrightWorkerOptions {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   use: {
 | 
			
		||||
@ -2616,7 +2616,7 @@ export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
 | 
			
		||||
 * [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   use: {
 | 
			
		||||
 *     headless: false,
 | 
			
		||||
@ -3937,7 +3937,7 @@ export interface TestError {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -4163,7 +4163,7 @@ interface TestProject {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
 | 
			
		||||
@ -323,7 +323,7 @@ export interface FullResult {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   reporter: './my-awesome-reporter.ts',
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										78
									
								
								tests/config/experimental.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										78
									
								
								tests/config/experimental.d.ts
									
									
									
									
										vendored
									
									
								
							@ -16226,7 +16226,7 @@ type UseOptions<TestArgs, WorkerArgs> = { [K in keyof WorkerArgs]?: WorkerArgs[K
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -16280,7 +16280,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -16314,7 +16314,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -16446,7 +16446,7 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -16525,7 +16525,7 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -16558,7 +16558,7 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -16583,7 +16583,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   reporter: 'line',
 | 
			
		||||
@ -16612,7 +16612,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   webServer: {
 | 
			
		||||
   *     command: 'npm run start',
 | 
			
		||||
@ -16646,7 +16646,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   expect: {
 | 
			
		||||
@ -16738,7 +16738,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   forbidOnly: !!process.env.CI,
 | 
			
		||||
@ -16766,7 +16766,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalSetup: './global-setup',
 | 
			
		||||
@ -16785,7 +16785,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTeardown: './global-teardown',
 | 
			
		||||
@ -16803,7 +16803,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTimeout: process.env.CI ? 60 * 60 * 1000 : undefined,
 | 
			
		||||
@ -16839,7 +16839,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   maxFailures: process.env.CI ? 1 : 0,
 | 
			
		||||
@ -16866,7 +16866,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   outputDir: './test-results',
 | 
			
		||||
@ -16959,7 +16959,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   retries: 2,
 | 
			
		||||
@ -17030,7 +17030,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testDir: './tests/playwright',
 | 
			
		||||
@ -17049,7 +17049,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testIgnore: '**\/test-assets/**',
 | 
			
		||||
@ -17068,7 +17068,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   testMatch: /.*\.e2e\.js/,
 | 
			
		||||
@ -17088,7 +17088,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   timeout: 5 * 60 * 1000,
 | 
			
		||||
@ -17121,7 +17121,7 @@ interface TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   workers: 3,
 | 
			
		||||
@ -17142,7 +17142,7 @@ interface TestConfig {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -17166,7 +17166,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   use: {
 | 
			
		||||
@ -17192,7 +17192,7 @@ export type Metadata = { [key: string]: any };
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   timeout: 30000,
 | 
			
		||||
@ -17212,7 +17212,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   forbidOnly: !!process.env.CI,
 | 
			
		||||
@ -17238,7 +17238,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalSetup: './global-setup',
 | 
			
		||||
@ -17256,7 +17256,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTeardown: './global-teardown',
 | 
			
		||||
@ -17273,7 +17273,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   globalTimeout: process.env.CI ? 60 * 60 * 1000 : undefined,
 | 
			
		||||
@ -17306,7 +17306,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   maxFailures: process.env.CI ? 1 : 0,
 | 
			
		||||
@ -17345,7 +17345,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   reporter: 'line',
 | 
			
		||||
@ -17394,7 +17394,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   workers: 3,
 | 
			
		||||
@ -17423,7 +17423,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   webServer: {
 | 
			
		||||
   *     command: 'npm run start',
 | 
			
		||||
@ -18634,7 +18634,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import { Options } from './my-test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig<Options> = {
 | 
			
		||||
@ -18709,7 +18709,7 @@ type ConnectOptions = {
 | 
			
		||||
 * [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   use: {
 | 
			
		||||
 *     headless: false,
 | 
			
		||||
@ -18744,7 +18744,7 @@ export interface PlaywrightWorkerOptions {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   use: {
 | 
			
		||||
@ -18836,7 +18836,7 @@ export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
 | 
			
		||||
 * [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   use: {
 | 
			
		||||
 *     headless: false,
 | 
			
		||||
@ -20149,7 +20149,7 @@ export interface TestError {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 * import { type PlaywrightTestConfig, devices } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   // Options shared for all projects.
 | 
			
		||||
@ -20411,7 +20411,7 @@ interface TestProject {
 | 
			
		||||
   *
 | 
			
		||||
   * ```ts
 | 
			
		||||
   * // playwright.config.ts
 | 
			
		||||
   * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
   *
 | 
			
		||||
   * const config: PlaywrightTestConfig = {
 | 
			
		||||
   *   projects: [
 | 
			
		||||
@ -20863,7 +20863,7 @@ export interface FullResult {
 | 
			
		||||
 *
 | 
			
		||||
 * ```ts
 | 
			
		||||
 * // playwright.config.ts
 | 
			
		||||
 * import { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 * import type { PlaywrightTestConfig } from '@playwright/test';
 | 
			
		||||
 *
 | 
			
		||||
 * const config: PlaywrightTestConfig = {
 | 
			
		||||
 *   reporter: './my-awesome-reporter.ts',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user