node-postgres/test/integration/client/empty-query-tests.js
Brian C 8798e50ad3 Re-enable eslint with standard format (#1367)
* Work on converting lib to standard

* Finish updating lib

* Finish linting lib

* Format test files

* Add .eslintrc with standard format

* Supply full path to eslint bin

* Move lint command to package.json

* Add eslint as dev dependency
2017-07-15 12:05:58 -05:00

21 lines
486 B
JavaScript

'use strict'
var helper = require('./test-helper')
const suite = new helper.Suite()
suite.test('empty query message handling', function (done) {
const client = helper.client()
assert.emits(client, 'drain', function () {
client.end(done)
})
client.query({text: ''})
})
suite.test('callback supported', function (done) {
const client = helper.client()
client.query('', function (err, result) {
assert(!err)
assert.empty(result.rows)
client.end(done)
})
})