Skip to content

Commit 9281ff9

Browse files
committed
failing test for query errors not being trapped in callback
1 parent e6e643a commit 9281ff9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/client/api-tests.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ test('raises error if cannot connect', function() {
6464
assert.ok(err, 'should have raised an error')
6565
}))
6666
})
67+
68+
test("query errors are handled and do not bubble if callbac is provded", function() {
69+
pg.connect(connectionString, assert.calls(function(err, client) {
70+
assert.isNull(err)
71+
client.query("SELECT OISDJF FROM LEIWLISEJLSE", assert.calls(function(err, result) {
72+
assert.ok(err);
73+
}))
74+
}))
75+
})

0 commit comments

Comments
 (0)