chore: lint code example
This commit is contained in:
parent
5e212da2be
commit
fc522aa5ea
|
|
@ -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) },
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
6
packages/playwright/types/test.d.ts
vendored
6
packages/playwright/types/test.d.ts
vendored
|
|
@ -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) },
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue