rename to unknownError

This commit is contained in:
Simon Knott 2024-08-22 16:12:16 +02:00
parent 8ff2fc886c
commit e4b1dc95dc
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -289,8 +289,8 @@ class ExpectMetaInfoProxyHandler implements ProxyHandler<any> {
const step = testInfo._addStep(stepInfo);
const reportStepError = (_error: unknown) => {
const jestError = _error instanceof Error ? _error : new Error(String(_error));
const reportStepError = (unknownError: unknown) => {
const jestError = unknownError instanceof Error ? unknownError : new Error(String(unknownError));
const error = isExpectError(jestError) ? new ExpectError(jestError, customMessage, stackFrames) : jestError;
step.complete({ error });
if (this._info.isSoft)