playwright
Advanced tools
Comparing version 1.47.0-alpha-2024-08-26 to 1.47.0-alpha-2024-08-27
@@ -219,3 +219,3 @@ "use strict"; | ||
const reportStepError = jestError => { | ||
const error = new _matcherHint.ExpectError(jestError, customMessage, stackFrames); | ||
const error = (0, _matcherHint.isExpectError)(jestError) ? new _matcherHint.ExpectError(jestError, customMessage, stackFrames) : jestError; | ||
step.complete({ | ||
@@ -222,0 +222,0 @@ error |
@@ -6,3 +6,5 @@ "use strict"; | ||
}); | ||
exports.kNoElementsFoundError = exports.ExpectError = void 0; | ||
exports.ExpectError = void 0; | ||
exports.isExpectError = isExpectError; | ||
exports.kNoElementsFoundError = void 0; | ||
exports.matcherHint = matcherHint; | ||
@@ -46,2 +48,5 @@ var _utilsBundle = require("playwright-core/lib/utilsBundle"); | ||
} | ||
exports.ExpectError = ExpectError; | ||
exports.ExpectError = ExpectError; | ||
function isExpectError(e) { | ||
return e instanceof Error && 'matcherResult' in e; | ||
} |
@@ -207,3 +207,4 @@ "use strict"; | ||
if (result.error) { | ||
if (!result.error[stepSymbol]) result.error[stepSymbol] = step; | ||
var _result$error; | ||
if (typeof result.error === 'object' && !((_result$error = result.error) !== null && _result$error !== void 0 && _result$error[stepSymbol])) result.error[stepSymbol] = step; | ||
const error = (0, _util.serializeError)(result.error); | ||
@@ -265,3 +266,3 @@ if (data.boxedStack) error.stack = `${error.message}\n${(0, _utils.stringifyStackFrames)(data.boxedStack).join('\n')}`; | ||
const serialized = (0, _util.serializeError)(error); | ||
const step = error[stepSymbol]; | ||
const step = typeof error === 'object' ? error === null || error === void 0 ? void 0 : error[stepSymbol] : undefined; | ||
if (step && step.boxedStack) serialized.stack = `${error.name}: ${error.message}\n${(0, _utils.stringifyStackFrames)(step.boxedStack).join('\n')}`; | ||
@@ -268,0 +269,0 @@ this.errors.push(serialized); |
{ | ||
"name": "playwright", | ||
"version": "1.47.0-alpha-2024-08-26", | ||
"version": "1.47.0-alpha-2024-08-27", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -61,3 +61,3 @@ "repository": { | ||
"dependencies": { | ||
"playwright-core": "1.47.0-alpha-2024-08-26" | ||
"playwright-core": "1.47.0-alpha-2024-08-27" | ||
}, | ||
@@ -64,0 +64,0 @@ "optionalDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3063700
34143
+ Addedplaywright-core@1.47.0-alpha-2024-08-27(transitive)
- Removedplaywright-core@1.47.0-alpha-2024-08-26(transitive)