chore: lint code example

This commit is contained in:
Mathias Leppich 2024-10-11 09:40:42 +02:00
parent 5e212da2be
commit fc522aa5ea
2 changed files with 6 additions and 6 deletions

View file

@ -172,11 +172,11 @@ Filter test cases by function. `TestFilter` can either be predicate function or
import { defineConfig } from '@playwright/test'; import { defineConfig } from '@playwright/test';
export default defineConfig({ export default defineConfig({
filter: (test) => test.title === 'some test', filter: test => test.title === 'some test',
// or // or
filter: { filterTests: (tests) => tests.filter((test, index) => index % 2 === 0) }, filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) },
// or // or
filter: { filterTestGroups: (testgroups) => testgroups.filter((testgroups, index) => index % 2 === 0) }, filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) },
}); });
``` ```

View file

@ -1047,11 +1047,11 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
* import { defineConfig } from '@playwright/test'; * import { defineConfig } from '@playwright/test';
* *
* export default defineConfig({ * export default defineConfig({
* filter: (test) => test.title === 'some test', * filter: test => test.title === 'some test',
* // or * // or
* filter: { filterTests: (tests) => tests.filter((test, index) => index % 2 === 0) }, * filter: { filterTests: tests => tests.filter((test, index) => index % 2 === 0) },
* // or * // or
* filter: { filterTestGroups: (testgroups) => testgroups.filter((testgroups, index) => index % 2 === 0) }, * filter: { filterTestGroups: testgroups => testgroups.filter((testgroups, index) => index % 2 === 0) },
* }); * });
* ``` * ```
* *