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

40 lines
794 B
JavaScript

'use strict'
var helper = require('./test-helper')
const suite = new helper.Suite()
suite.test('noData message handling', function () {
var client = helper.client()
var q = client.query({
name: 'boom',
text: 'create temp table boom(id serial, size integer)'
})
client.query({
name: 'insert',
text: 'insert into boom(size) values($1)',
values: [100]
}, function (err, result) {
if (err) {
console.log(err)
throw err
}
})
client.query({
name: 'insert',
values: [101]
})
var query = client.query({
name: 'fetch',
text: 'select size from boom where size < $1',
values: [101]
}, (err, res) => {
var row = res.rows[0]
assert.strictEqual(row.size, 100)
})
client.on('drain', client.end.bind(client))
})