Improve assert.throws output

This commit is contained in:
Richard Gibson 2020-08-20 16:55:55 -04:00
parent 3bcbc12287
commit 2f9392f288
1 changed files with 1 additions and 1 deletions

View File

@ -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;