node-postgres/test/integration/connection-pool/ending-empty-pool-tests.js

16 lines
293 B
JavaScript

var helper = require(__dirname + '/test-helper')
var called = false;
test('disconnects', function() {
called = true;
var eventSink = new helper.Sink(1, function() {});
helper.pg.on('end', function() {
eventSink.add();
});
//this should exit the process
helper.pg.end();
})