mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Improve assert.throws output
This commit is contained in:
parent
93ff9b7262
commit
6207a8058a
@ -84,7 +84,7 @@ assert.throws = function (expectedErrorConstructor, func, message) {
|
||||
message += 'Thrown value was not an object!';
|
||||
$ERROR(message);
|
||||
} else if (thrown.constructor !== expectedErrorConstructor) {
|
||||
message += 'Expected a ' + expectedErrorConstructor.name + ' but got a ' + thrown.constructor.name;
|
||||
message += 'Expected a ' + expectedErrorConstructor.name + ' but got a ' + thrown.constructor.name + ' ' + thrown.message;
|
||||
$ERROR(message);
|
||||
}
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user