Skip to content

Commit 6eea7b3

Browse files
committed
added unit test for connection propagating stream errors
1 parent d207947 commit 6eea7b3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var helper = require(__dirname + '/test-helper');
2+
3+
var con = new Connection({stream: new MemoryStream()});
4+
test("connection emits stream errors", function() {
5+
assert.emits(con, 'error', function(err) {
6+
assert.equal(err, "OMG!");
7+
});
8+
con.connect();
9+
con.stream.emit('error', "OMG!");
10+
});

test/unit/prepared-query-tests.js

Whitespace-only changes.

0 commit comments

Comments
 (0)