diff --git a/test/unit/connection/error-tests.js b/test/unit/connection/error-tests.js index 5bf9dc6e..bccffac4 100644 --- a/test/unit/connection/error-tests.js +++ b/test/unit/connection/error-tests.js @@ -3,8 +3,8 @@ var Connection = require(__dirname + '/../../../lib/connection'); var con = new Connection({stream: new MemoryStream()}); test("connection emits stream errors", function() { assert.emits(con, 'error', function(err) { - assert.equal(err, "OMG!"); + assert.equal(err.message, "OMG!"); }); con.connect(); - con.stream.emit('error', "OMG!"); + con.stream.emit('error', new Error("OMG!")); });