mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
failing test for query errors not being trapped in callback
This commit is contained in:
parent
e6e643ac6d
commit
9281ff9860
@ -64,3 +64,12 @@ test('raises error if cannot connect', function() {
|
||||
assert.ok(err, 'should have raised an error')
|
||||
}))
|
||||
})
|
||||
|
||||
test("query errors are handled and do not bubble if callbac is provded", function() {
|
||||
pg.connect(connectionString, assert.calls(function(err, client) {
|
||||
assert.isNull(err)
|
||||
client.query("SELECT OISDJF FROM LEIWLISEJLSE", assert.calls(function(err, result) {
|
||||
assert.ok(err);
|
||||
}))
|
||||
}))
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user