mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
* Add client connectionString tests (#1310) * Remove redundant tests * Add client connectionString test Add test to ensure { connectionString } is respected as an argument to the client constructor * Add test for connection string property Also fixed some legacy require statements. * Normalize native error properties Map native error properties to the same property names we use for errors from the JS driver. Fixes #972 Fixes #938
14 lines
379 B
JavaScript
14 lines
379 B
JavaScript
var helper = require("../test-helper");
|
|
var pg = require("../../../lib");
|
|
|
|
pg.connect(helper.config, assert.success(function(client, done) {
|
|
assert.equal(Object.keys(pg._pools).length, 1);
|
|
pg.connect(helper.config, assert.success(function(client2, done2) {
|
|
assert.equal(Object.keys(pg._pools).length, 1);
|
|
|
|
done();
|
|
done2();
|
|
pg.end();
|
|
}));
|
|
}));
|