mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(test runner): add an overload for test.skip(title, fn) (#8454)
We shipped this feature, but forgot to add the right overload to d.ts.
This commit is contained in:
parent
204b6321b4
commit
a479cb6f52
@ -179,6 +179,10 @@ test('test modifiers should check types', async ({runTSC}) => {
|
||||
// @ts-expect-error
|
||||
test.skip(42);
|
||||
});
|
||||
test.skip('skipped', async ({}) => {
|
||||
});
|
||||
// @ts-expect-error
|
||||
test.skip('skipped', 'skipped');
|
||||
`,
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
|
||||
1
types/test.d.ts
vendored
1
types/test.d.ts
vendored
@ -1626,6 +1626,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||
* skipped when the condition is `true`.
|
||||
* @param testFunctionOrDescription When used with `test.skip('test', () => {})` notation, second argument is a test function. Otherwise it is an optional description that will be reflected in a test report.
|
||||
*/
|
||||
skip(title: string, testFunction: (args: TestArgs, testInfo: TestInfo) => Promise<void> | void): void;
|
||||
skip(): void;
|
||||
skip(condition: boolean): void;
|
||||
skip(condition: boolean, description: string): void;
|
||||
|
||||
1
utils/generate_types/overrides-test.d.ts
vendored
1
utils/generate_types/overrides-test.d.ts
vendored
@ -227,6 +227,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||
only: SuiteFunction;
|
||||
};
|
||||
};
|
||||
skip(title: string, testFunction: (args: TestArgs, testInfo: TestInfo) => Promise<void> | void): void;
|
||||
skip(): void;
|
||||
skip(condition: boolean): void;
|
||||
skip(condition: boolean, description: string): void;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user