Skip to content

Commit c98bb21

Browse files
committed
failing test for native query with object as first parameter and callback as second parameter
1 parent bab0382 commit c98bb21

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

test/integration/client/api-tests.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ test("query errors are handled and do not bubble if callback is provded", functi
9696
client.query("SELECT OISDJF FROM LEIWLISEJLSE", assert.calls(function(err, result) {
9797
assert.ok(err);
9898
log("query error supplied error to callback")
99-
sink.add();
100-
}))
99+
sink.add();
100+
}))
101101
}))
102102
})
103103

@@ -116,3 +116,16 @@ test('callback is fired once and only once', function() {
116116
})
117117
}))
118118
})
119+
120+
test('can provide callback and config object', function() {
121+
pg.connect(connectionString, assert.calls(function(err, client) {
122+
assert.isNull(err);
123+
client.query({
124+
name: 'boom',
125+
text: 'select NOW()'
126+
}, assert.calls(function(err, result) {
127+
assert.isNull(err);
128+
assert.equal(result.rows[0].now.getYear(), new Date().getYear())
129+
}))
130+
}))
131+
})

0 commit comments

Comments
 (0)