harness/asyncHelpers.js: Update throwsAsync to not succeed on a bad thenable

Fixes #4186
This commit is contained in:
Richard Gibson 2024-08-01 12:42:01 -04:00 committed by Ms2ger
parent 7a916718cf
commit feb400c685

View File

@ -72,7 +72,7 @@ assert.throwsAsync = function (expectedErrorConstructor, func, message) {
} }
try { try {
resolve(res.then( resolve(Promise.resolve(res).then(
function () { function () {
fail(expectation + " but no exception was thrown at all"); fail(expectation + " but no exception was thrown at all");
}, },