From 67a2290f30c03e1f3d3d9b6502609538f69acb3e Mon Sep 17 00:00:00 2001 From: brianc Date: Wed, 21 Sep 2011 14:34:02 -0500 Subject: [PATCH] emit error object from memory stream --- test/unit/connection/error-tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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!")); });