Brian C 50c06f9bc6
Remove test globals (#3264)
* Remove assert from globals

* Remove Client from globals

* Remove global test function

* Remove MemoryStream from globals

* Require assert in SASL integration tests

* Attempt to use a postgres with ssl?

* Use latest image

* Remove connection tests - they test internals that are better covered by testint the client
2024-06-19 13:46:16 -05:00

29 lines
763 B
JavaScript

'use strict'
var helper = require('./test-helper')
const pool = new helper.pg.Pool()
const assert = require('assert')
pool.connect(
assert.success(function (client, done) {
var types = require('pg-types')
// 1231 = numericOID
types.setTypeParser(1700, function () {
return 'yes'
})
types.setTypeParser(1700, 'binary', function () {
return 'yes'
})
var bignum = '294733346389144765940638005275322203805'
client.query('CREATE TEMP TABLE bignumz(id numeric)')
client.query('INSERT INTO bignumz(id) VALUES ($1)', [bignum])
client.query(
'SELECT * FROM bignumz',
assert.success(function (result) {
assert.equal(result.rows[0].id, 'yes')
done()
pool.end()
})
)
})
)