From cc74451222f69212aa489982abc04d3049340957 Mon Sep 17 00:00:00 2001 From: Pengoose Date: Tue, 8 Oct 2024 16:28:33 +0900 Subject: [PATCH] feat: add fail.only tsdoc --- packages/playwright/types/test.d.ts | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 717a93c296..224f6da7f9 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -3936,7 +3936,45 @@ export interface TestType { + * // Test code that is expected to fail + * }); + * ``` + * + * @param title Test title. + * @param body Test body. + */ (title: string, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise | void): void; + /** + * Focuses the test marked as "should fail" with additional details. Playwright runs this test and ensures that it is actually failing. + * + * ```js + * import { test, expect } from '@playwright/test'; + * + * test.fail.only('focus on failing test', { timeout: 5000 }, async ({ page }) => { + * // Test code that is expected to fail + * }); + * ``` + * + * @param title Test title. + * @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-fail) for test details description. + * @param body Test body. + */ (title: string, details: TestDetails, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise | void): void; }; }