node-postgres/packages/pg/test/integration/client/query-column-names-tests.js
Sehrope Sarkuni eeb62ba40d test: Replace __dirname concatenations in require(...) with relative paths
Replaces __dirname concatentation in pg test scripts so that editors like
VS Code can automatically generate typings and support code navigation (F12).
2020-05-16 07:41:15 -04:00

21 lines
533 B
JavaScript

'use strict'
var helper = require('../test-helper')
var pg = helper.pg
new helper.Suite().test('support for complex column names', function () {
const pool = new pg.Pool()
pool.connect(
assert.success(function (client, done) {
client.query('CREATE TEMP TABLE t ( "complex\'\'column" TEXT )')
client.query(
'SELECT * FROM t',
assert.success(function (res) {
done()
assert.strictEqual(res.fields[0].name, "complex''column")
pool.end()
})
)
})
)
})