mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
17 lines
404 B
JavaScript
17 lines
404 B
JavaScript
var helper = require(__dirname+'/test-helper');
|
|
var client = helper.client();
|
|
|
|
test("empty query message handling", function() {
|
|
var query = client.query("");
|
|
assert.emits(query, 'end');
|
|
client.on('drain', client.end.bind(client));
|
|
});
|
|
|
|
test('callback supported', assert.calls(function() {
|
|
client.query("", function(err, result) {
|
|
assert.isNull(err);
|
|
assert.empty(result.rows);
|
|
})
|
|
}))
|
|
|