diff --git a/lib/assert.js b/lib/assert.js index e5b4edb76ec655..3c94d2ae0c88b0 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -290,7 +290,8 @@ assert.notStrictEqual = function notStrictEqual(actual, expected, message) { }; function expectedException(actual, expected) { - if (!actual || !expected) { + // actual is guaranteed to be an Error object, but we need to check expected. + if (!expected) { return false; }