node-postgres/test/integration/test-helper.js

19 lines
400 B
JavaScript
Raw Normal View History

2010-10-25 14:30:14 +08:00
var helper = require(__dirname + '/../test-helper');
if(helper.args.native) {
Client = require(__dirname + '/../../lib/native');
2012-05-31 11:40:49 +08:00
helper.Client = Client;
helper.pg = helper.pg.native;
}
2012-05-31 11:40:49 +08:00
//creates a client from cli parameters
helper.client = function() {
var client = new Client(helper.config);
client.connect();
return client;
};
2010-10-25 14:30:14 +08:00
//export parent helper stuffs
2010-12-14 07:21:09 +08:00
module.exports = helper;