diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md index e6393b2758..8503c212f5 100644 --- a/docs/src/test-api/class-testconfig.md +++ b/docs/src/test-api/class-testconfig.md @@ -172,11 +172,11 @@ Filter test cases by function. `TestFilter` can either be predicate function or import { defineConfig } from '@playwright/test'; export default defineConfig({ - filter: (test) => test.title === 'some test', + filter: test => test.title === 'some test', // or - filter: { filterTests: (tests) => tests.filter((test, index) => index % 2 === 0) }, + filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) }, // or - filter: { filterTestGroups: (testgroups) => testgroups.filter((testgroups, index) => index % 2 === 0) }, + filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) }, }); ``` diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 91b9bdb37d..917a5e6fde 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -1047,11 +1047,11 @@ interface TestConfig { * import { defineConfig } from '@playwright/test'; * * export default defineConfig({ - * filter: (test) => test.title === 'some test', + * filter: test => test.title === 'some test', * // or - * filter: { filterTests: (tests) => tests.filter((test, index) => index % 2 === 0) }, + * filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) }, * // or - * filter: { filterTestGroups: (testgroups) => testgroups.filter((testgroups, index) => index % 2 === 0) }, + * filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) }, * }); * ``` *