Skip to content

Commit

Permalink
Harness: Account for Symbols being thrown in async tests
Browse files Browse the repository at this point in the history
It's possible for an async test to throw a Symbol (harness/async-gc.js
does this.) The Symbol ends up getting passed to $DONE in a
.then($DONE, $DONE) call. Previously, $DONE would then throw an exception
due to not being able to convert the Symbol to a string.
  • Loading branch information
ptomato authored and Ms2ger committed Oct 12, 2022
1 parent 554a18c commit 1bb7ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion harness/doneprintHandle.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function $DONE(error) {
if(typeof error === 'object' && error !== null && 'name' in error) {
__consolePrintHandle__('Test262:AsyncTestFailure:' + error.name + ': ' + error.message);
} else {
__consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + error);
__consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + String(error));
}
} else {
__consolePrintHandle__('Test262:AsyncTestComplete');
Expand Down

0 comments on commit 1bb7ece

Please sign in to comment.