diff --git a/test/integration/client/api-tests.js b/test/integration/client/api-tests.js index 22af61a2..ff05b9b8 100644 --- a/test/integration/client/api-tests.js +++ b/test/integration/client/api-tests.js @@ -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); + })) + })) +})