Skip to content

Commit ab5a0cb

Browse files
author
Raymond Feng
committed
Fix the datasource init
1 parent 25ed325 commit ab5a0cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/init.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ if (process.env.CI) {
1717
};
1818
}
1919

20-
var url = 'postgres://' + config.username || config.user + ':' +
21-
config.password + '@' + config.host || config.hostname + ':' +
20+
var url = 'postgres://' + (config.username || config.user) + ':' +
21+
config.password + '@' + (config.host || config.hostname) + ':' +
2222
config.port + '/' + config.database;
2323

2424
global.getDataSource = global.getSchema = function(useUrl) {
2525
var settings = config;
2626
if (useUrl) {
2727
settings = {url: url};
2828
}
29-
var db = new DataSource(require('../'), config);
29+
var db = new DataSource(require('../'), settings);
3030
db.log = function(a) {
3131
// console.log(a);
3232
};

0 commit comments

Comments
 (0)