UNPKG

@serenity-js/playwright

Version:

Adapter that integrates @serenity-js/web with Playwright, enabling Serenity/JS reporting and using the Screenplay Pattern to write component and end-to-end test scenarios

12 lines (11 loc) 364 B
/** * Playwright 1.33.0 and newer rely on "zones" recorded in the stack trace * to establish child-parent relationship between Playwright tasks. * * This helper function ensures that the stack trace is correctly recorded. * * @param value */ export function promised<T>(value: Promise<T> | T): Promise<T> { return Promise.resolve().then(() => value); }