Skip to content

Commit

Permalink
debugging mode for karma
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Sep 16, 2014
1 parent e269391 commit b5b6ec8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion karma.conf.js
Expand Up @@ -10,6 +10,17 @@
// continuous run using Chrome
// karma start karma.conf.js --single-run=false --browsers=Chrome

// if you want to debug source code in the browser and do not need coverage
// karma start karma.conf.js --single-run=false --browsers=Chrome --debug

var sourcePreprocessors = 'coverage';
function isDebug(argument) {
return argument === '--debug';
}
if (process.argv.some(isDebug)) {
sourcePreprocessors = [];
}

module.exports = function (config) {
config.set({

Expand All @@ -34,7 +45,7 @@ module.exports = function (config) {
],

preprocessors: {
'index.js': 'coverage',
'index.js': sourcePreprocessors,
},

// test results reporter to use
Expand Down

0 comments on commit b5b6ec8

Please sign in to comment.