playwright
Advanced tools
Comparing version 1.51.0-alpha-2025-01-18 to 1.51.0-alpha-2025-01-19
@@ -248,4 +248,15 @@ "use strict"; | ||
try { | ||
const result = await (0, _utils.raceAgainstDeadline)(async () => body(), options.timeout ? (0, _utils.monotonicTime)() + options.timeout : 0); | ||
if (result.timedOut) throw new _playwrightCore.errors.TimeoutError(`Step timeout ${options.timeout}ms exceeded.`); | ||
let result = undefined; | ||
result = await (0, _utils.raceAgainstDeadline)(async () => { | ||
try { | ||
return await body(); | ||
} catch (e) { | ||
var _result; | ||
// If the step timed out, the test fixtures will tear down, which in turn | ||
// will abort unfinished actions in the step body. Record such errors here. | ||
if ((_result = result) !== null && _result !== void 0 && _result.timedOut) testInfo._failWithError(e); | ||
throw e; | ||
} | ||
}, options.timeout ? (0, _utils.monotonicTime)() + options.timeout : 0); | ||
if (result.timedOut) throw new _playwrightCore.errors.TimeoutError(`Step timeout of ${options.timeout}ms exceeded.`); | ||
step.complete({}); | ||
@@ -252,0 +263,0 @@ return result.result; |
{ | ||
"name": "playwright", | ||
"version": "1.51.0-alpha-2025-01-18", | ||
"version": "1.51.0-alpha-2025-01-19", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -59,3 +59,3 @@ "repository": { | ||
"dependencies": { | ||
"playwright-core": "1.51.0-alpha-2025-01-18" | ||
"playwright-core": "1.51.0-alpha-2025-01-19" | ||
}, | ||
@@ -62,0 +62,0 @@ "optionalDependencies": { |
3173308
36247
+ Addedplaywright-core@1.51.0-alpha-2025-01-19(transitive)
- Removedplaywright-core@1.51.0-alpha-2025-01-18(transitive)