diff --git a/tests/playwright-test/test-modifiers.spec.ts b/tests/playwright-test/test-modifiers.spec.ts index 690f527fc6..5714cc75f1 100644 --- a/tests/playwright-test/test-modifiers.spec.ts +++ b/tests/playwright-test/test-modifiers.spec.ts @@ -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); diff --git a/types/test.d.ts b/types/test.d.ts index 4490d9938f..6abcc096bf 100644 --- a/types/test.d.ts +++ b/types/test.d.ts @@ -1626,6 +1626,7 @@ export interface TestType {})` 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; skip(): void; skip(condition: boolean): void; skip(condition: boolean, description: string): void; diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.ts index 9cf4363f3f..db49461b58 100644 --- a/utils/generate_types/overrides-test.d.ts +++ b/utils/generate_types/overrides-test.d.ts @@ -227,6 +227,7 @@ export interface TestType Promise | void): void; skip(): void; skip(condition: boolean): void; skip(condition: boolean, description: string): void;