diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md index 39830f6945..5785cf33ce 100644 --- a/docs/src/test-api/class-testconfig.md +++ b/docs/src/test-api/class-testconfig.md @@ -178,13 +178,19 @@ export default defineConfig({ Or... ```js export default defineConfig({ - filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) }, + filter: { + filterTests: tests => tests.filter((test, index) => index % 2 === 0) + }, }); ``` Or... ```js export default defineConfig({ - filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) }, + filter: { + filterTestGroups: testgroups => { + return testgroups.filter((testgroups, index) => index % 2 === 0) + }, + }, }); ``` diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index f53db33adc..fb267b148b 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -1055,7 +1055,9 @@ interface TestConfig { * * ```js * export default defineConfig({ - * filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) }, + * filter: { + * filterTests: tests => tests.filter((test, index) => index % 2 === 0) + * }, * }); * ``` * @@ -1063,7 +1065,11 @@ interface TestConfig { * * ```js * export default defineConfig({ - * filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) }, + * filter: { + * filterTestGroups: testgroups => { + * return testgroups.filter((testgroups, index) => index % 2 === 0) + * }, + * }, * }); * ``` *