diff --git a/test/unit/connection/error-tests.js b/test/unit/connection/error-tests.js index d714c058..f72e9ff0 100644 --- a/test/unit/connection/error-tests.js +++ b/test/unit/connection/error-tests.js @@ -74,7 +74,7 @@ for (var i = 0; i < SSLNegotiationPacketTests.length; i++) { var con = new Connection({ssl: true}) con.connect(7778, 'localhost') assert.emits(con, tc.responseType, function (err) { - if (err && tc.errorMessage) { + if (tc.errorMessage !== null || err) { assert.equal(err.message, tc.errorMessage) } con.end()