mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Fix lint & enable all tests
This commit is contained in:
parent
507c7eaca4
commit
cedce4bded
11
test/pool.js
11
test/pool.js
@ -86,11 +86,11 @@ describe('pool', function() {
|
||||
|
||||
it('can close multiple times on a pool', async function() {
|
||||
const pool = new pg.Pool({ max: 1 })
|
||||
const run = () =>
|
||||
new Promise(async resolve => {
|
||||
const cursor = new Cursor(text)
|
||||
const client = await pool.connect()
|
||||
client.query(cursor)
|
||||
const run = async () => {
|
||||
const cursor = new Cursor(text)
|
||||
const client = await pool.connect()
|
||||
client.query(cursor)
|
||||
new Promise(resolve => {
|
||||
cursor.read(25, function(err) {
|
||||
assert.ifError(err)
|
||||
cursor.close(function(err) {
|
||||
@ -100,6 +100,7 @@ describe('pool', function() {
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
await Promise.all([run(), run(), run()])
|
||||
await pool.end()
|
||||
})
|
||||
|
||||
@ -28,7 +28,7 @@ describe('transactions', () => {
|
||||
await client.end()
|
||||
})
|
||||
|
||||
it.only('can execute multiple statements in a transaction if no data', async () => {
|
||||
it('can execute multiple statements in a transaction if no data', async () => {
|
||||
const client = new pg.Client()
|
||||
await client.connect()
|
||||
await client.query('begin')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user