Alex Anderson 83a0e3e90e
eslint: enable rule: @typescript-eslint/no-unused-vars (#3247)
When enabling this rule, it's recommended to also *disable* the standard `no-unused-vars` rule.  Although `no-unused-vars` is not currently enabled, it seems helpful to explicitly disable it here.

See: https://typescript-eslint.io/rules/no-unused-vars/

Co-authored-by: alxndrsn <alxndrsn>
2024-06-18 15:55:17 -05:00

23 lines
539 B
JavaScript

'use strict'
const helper = require('./../test-helper')
const assert = require('assert')
const suite = new helper.Suite()
suite.testAsync('BoundPool can be subclassed', async () => {
const Pool = helper.pg.Pool
class SubPool extends Pool {}
const subPool = new SubPool()
const client = await subPool.connect()
client.release()
await subPool.end()
assert(subPool instanceof helper.pg.Pool)
})
suite.test('calling pg.Pool without new throws', () => {
const Pool = helper.pg.Pool
assert.throws(() => {
Pool()
})
})