mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
* Make tests pass in github codespaces There were a few tests which didn't specify a host or port which wasn't working well inside the codespaces docker environment. Added host & port where required. Also noticed one test wasn't actually _testing_, it was just `console.log`-ing its output, so I added proper assertions there. Finally set `PGTESTNOSSL: true` in the codespaces environment until I can get the postgres docker container configured w/ SSL...which I will do l8r. * lint
16 lines
516 B
JavaScript
16 lines
516 B
JavaScript
const assert = require('assert')
|
|
const helper = require('../test-helper')
|
|
const suite = new helper.Suite()
|
|
const { Client } = helper.pg
|
|
|
|
suite.test('it sends options', async () => {
|
|
const client = new Client({
|
|
options: '--default_transaction_isolation=serializable',
|
|
})
|
|
await client.connect()
|
|
const { rows } = await client.query('SHOW default_transaction_isolation')
|
|
assert.strictEqual(rows.length, 1)
|
|
assert.strictEqual(rows[0].default_transaction_isolation, 'serializable')
|
|
await client.end()
|
|
})
|