Skip to content

Commit 705935d

Browse files
BridgeARMylesBorins
authored andcommittedApr 16, 2019
assert: fix backport regression
This fixes a regression for an error case with `assert.rejects` and `assert.doesNotReject`. Fixes: #27185 PR-URL: #27202 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent eaf474c commit 705935d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/assert.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ function getActual(block) {
720720

721721
async function waitForActual(block) {
722722
if (typeof block !== 'function') {
723-
throw new errors.ERR_INVALID_ARG_TYPE('block', 'Function', block);
723+
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'block', 'Function',
724+
block);
724725
}
725726

726727
// Return a rejected promise if `block` throws synchronously.

0 commit comments

Comments
 (0)
Please sign in to comment.