Skip to content

Commit 67a2290

Browse files
committed
emit error object from memory stream
1 parent 21b597e commit 67a2290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/connection/error-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ var Connection = require(__dirname + '/../../../lib/connection');
33
var con = new Connection({stream: new MemoryStream()});
44
test("connection emits stream errors", function() {
55
assert.emits(con, 'error', function(err) {
6-
assert.equal(err, "OMG!");
6+
assert.equal(err.message, "OMG!");
77
});
88
con.connect();
9-
con.stream.emit('error', "OMG!");
9+
con.stream.emit('error', new Error("OMG!"));
1010
});

0 commit comments

Comments
 (0)