Skip to content

Commit

Permalink
Stringify exceptions in createSetupErrorResult
Browse files Browse the repository at this point in the history
Otherwise the result formatting code gets confused.
  • Loading branch information
Ms2ger authored and ptomato committed Dec 2, 2024
1 parent e9bc388 commit 8aae170
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/testharness-shadowrealm-outer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ globalThis.setupFakeFetchOverMessagePort = function (port) {
* the test harness that the tests are finished and there was an error in the
* setup code.
*
* @param {message} string - error message
* @param {message} any - error
*/
globalThis.createSetupErrorResult = function (message) {
return {
Expand All @@ -144,7 +144,8 @@ globalThis.createSetupErrorResult = function (message) {
asserts: [],
status: {
status: 1, // TestsStatus.ERROR,
message,
message: String(message),
stack: typeof message === "object" && message !== null && "stack" in message ? message.stack : undefined,
},
};
};

0 comments on commit 8aae170

Please sign in to comment.