不要怂,就是干,撸起袖子干!

Commit 643da620 by ksmithut

fixed test for passing configuration options along with db string

1 parent bc20526d
Showing with 4 additions and 1 deletions
...@@ -104,6 +104,9 @@ module.exports = (function() { ...@@ -104,6 +104,9 @@ module.exports = (function() {
if (arguments.length === 1 || (arguments.length === 2 && typeof username === 'object')) { if (arguments.length === 1 || (arguments.length === 2 && typeof username === 'object')) {
options = username || {}; options = username || {};
urlParts = url.parse(arguments[0]); urlParts = url.parse(arguments[0]);
// reset username and password to null so we don't pass the options as the username
username = null;
password = null;
// SQLite don't have DB in connection url // SQLite don't have DB in connection url
if (urlParts.pathname) { if (urlParts.pathname) {
...@@ -1066,7 +1069,7 @@ module.exports = (function() { ...@@ -1066,7 +1069,7 @@ module.exports = (function() {
if (last && Utils._.isPlainObject(last) && last.hasOwnProperty('logging')) { if (last && Utils._.isPlainObject(last) && last.hasOwnProperty('logging')) {
options = last; options = last;
// remove options from set of logged arguments // remove options from set of logged arguments
args.splice(args.length-1, 1); args.splice(args.length-1, 1);
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!