mirror of
https://github.com/brianc/node-postgres.git
synced 2026-02-01 16:47:23 +00:00
21 lines
477 B
JavaScript
21 lines
477 B
JavaScript
'use strict'
|
|
require('./test-helper')
|
|
const net = require('net')
|
|
const pg = require('../../../lib/index.js')
|
|
const assert = require('assert')
|
|
|
|
/* console.log() messages show up in `make test` output. TODO: fix it. */
|
|
const server = net.createServer(function (c) {
|
|
c.destroy()
|
|
server.close()
|
|
})
|
|
|
|
server.listen(7777, function () {
|
|
const client = new pg.Client('postgres://localhost:7777')
|
|
client.connect(
|
|
assert.calls(function (err) {
|
|
assert(err)
|
|
})
|
|
)
|
|
})
|