karma-runner / karma

Spectacular Test Runner for JavaScript
http://karma-runner.github.io
MIT License
11.95k stars 1.71k forks source link

better config/CLI args validation #603

Open vojtajina opened 11 years ago

vojtajina commented 11 years ago
karma start test/e2e/basic/karma.conf.js --log-level

/Users/vojta/Code/karma/node_modules/log4js/lib/logger.js:56
    return this.level.isLessThanOrEqualTo(otherLevel);
                      ^
TypeError: Cannot call method 'isLessThanOrEqualTo' of undefined
    at Logger.isLevelEnabled (/Users/vojta/Code/karma/node_modules/log4js/lib/logger.js:56:23)
    at Logger.(anonymous function) [as debug] (/Users/vojta/Code/karma/node_modules/log4js/lib/logger.js:67:22)
    at requirePlugin (/Users/vojta/Code/karma/lib/plugin.js:12:9)
    at /Users/vojta/Code/karma/lib/plugin.js:38:9
    at Array.forEach (native)
    at Object.exports.resolve (/Users/vojta/Code/karma/lib/plugin.js:25:11)
    at Object.exports.start (/Users/vojta/Code/karma/lib/server.js:254:35)
    at Object.<anonymous> (/Users/vojta/Code/karma/bin/karma:20:39)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
vojtajina commented 10 years ago

Also stufff like:

{pattern: 'xxxx', included: 'false'}

Should 'false' be converted into a boolean false and show warning.