Skip to content
Permalink
Browse files

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>
  • Loading branch information...
BridgeAR authored and MylesBorins committed Apr 12, 2019
1 parent eaf474c commit 705935d62059d92543cda43c8cdb29bc34082d5e
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/assert.js
@@ -720,7 +720,8 @@ function getActual(block) {

async function waitForActual(block) {
if (typeof block !== 'function') {
throw new errors.ERR_INVALID_ARG_TYPE('block', 'Function', block);
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'block', 'Function',
block);
}

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

0 comments on commit 705935d

Please sign in to comment.
You can’t perform that action at this time.