Skip to content

Commit

Permalink
improving test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 21, 2016
1 parent e661608 commit 1cae27e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
3 changes: 1 addition & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var path = require('path');

var cfreader = require('./configfile');
// var logger = require('./logger');

module.exports = new Config();

Expand Down Expand Up @@ -123,4 +122,4 @@ Config.prototype.arrange_args = function (args) {
}

return [fs_name, fs_type, cb, options];
};
};
15 changes: 2 additions & 13 deletions readers/ini.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@ exports.init_booleans = function (options, result) {
};

exports.logger = function (msg, level) {
if (!level) level = 'logwarn';
if (!this.haLogger) {
try {
// even inside try, loading logger makes bad things happen.
// this.haLogger = require('../logger');
}
catch (ignore) {}
}

if (!this.haLogger) { return console.log(msg); }

try { this.haLogger[level](msg); }
catch (e) { console.log(e); console.log(msg); }
// if (!level) level = 'logwarn';
console.log(msg);
};
1 change: 1 addition & 0 deletions test/config/test.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; comment

bool_true=true
bool_false=false
Expand Down
2 changes: 1 addition & 1 deletion test/readers/flat.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports.load = {
test.deepEqual(result, 'line1');
test.done();
},
'returns hostname for "me"': function(test) {
'returns hostname for empty "me"': function(test) {
test.expect(1);
var result = this.flat.load( 'test/config/me', null, null, regex);
console.log(result);
Expand Down

0 comments on commit 1cae27e

Please sign in to comment.