????

Your IP : 216.73.216.131


Current Path : C:/inetpub/vhost/qnquyhoach.nextform.vn/api/node_modules/pg-pool/test/
Upload File :
Current File : C:/inetpub/vhost/qnquyhoach.nextform.vn/api/node_modules/pg-pool/test/logging.js

const expect = require('expect.js')

const describe = require('mocha').describe
const it = require('mocha').it

const Pool = require('../')

describe('logging', function () {
  it('logs to supplied log function if given', function () {
    const messages = []
    const log = function (msg) {
      messages.push(msg)
    }
    const pool = new Pool({ log: log })
    return pool.query('SELECT NOW()').then(function () {
      expect(messages.length).to.be.greaterThan(0)
      return pool.end()
    })
  })
})