Permalink
Browse files

assert: remove unneeded condition

PR-URL: #11314
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information...
Trott committed Feb 11, 2017
1 parent f18e08d commit 3429991d8b43474cab58f067658b5ce81ace58f8
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/assert.js
View
@@ -294,7 +294,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;
}

0 comments on commit 3429991

Please sign in to comment.