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

31 lines
667 B
JavaScript

'use strict'
var helper = require('../test-helper')
var assert = require('assert')
const pool = new helper.pg.Pool()
pool.connect(function (err, client, done) {
if (err) throw err
var c = 'CREATE TEMP TABLE posts (body TEXT)'
client.query(c, function (err) {
if (err) throw err
c = 'INSERT INTO posts (body) VALUES ($1) RETURNING *'
var body = Buffer.from('foo')
client.query(c, [body], function (err) {
if (err) throw err
body = Buffer.from([])
client.query(c, [body], function (err, res) {
done()
if (err) throw err
assert.equal(res.rows[0].body, '')
pool.end()
})
})
})
})