summaryrefslogtreecommitdiff
path: root/runtime/js/40_testing.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r--runtime/js/40_testing.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index fdd044503..c5adc1f59 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -804,7 +804,7 @@
await test.fn(step);
const failCount = step.failedChildStepsCount();
return failCount === 0 ? "ok" : {
- "failed": formatError(
+ "failed": core.destructureError(
new Error(
`${failCount} test step${failCount === 1 ? "" : "s"} failed.`,
),
@@ -812,7 +812,7 @@
};
} catch (error) {
return {
- "failed": formatError(error),
+ "failed": core.destructureError(error),
};
} finally {
step.finalized = true;
@@ -1211,11 +1211,11 @@
return "ignored";
case "pending":
return {
- "pending": this.error && formatError(this.error),
+ "pending": this.error && core.destructureError(this.error),
};
case "failed":
return {
- "failed": this.error && formatError(this.error),
+ "failed": this.error && core.destructureError(this.error),
};
default:
throw new Error(`Unhandled status: ${this.status}`);
@@ -1335,7 +1335,7 @@
subStep.status = "ok";
}
} catch (error) {
- subStep.error = formatError(error);
+ subStep.error = error;
subStep.status = "failed";
}