Skip to content

Commit

Permalink
add coverage in karma only for single run, fix #777
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiip committed Sep 14, 2015
1 parent 7791277 commit 868505a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/templates/_karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ module.exports = function(config) {
dir : 'coverage/'
},

reporters: ['progress', 'coverage']
reporters: ['progress']
};

var preprocessors = {};
var pathSrcHtml = path.join(conf.paths.src, '/**/*.html');
preprocessors[pathSrcHtml] = ['ng-html2js'];

if (config.singleRun) {
<% if (props.jsPreprocessor.key === 'noJsPrepro') { -%>
var pathSrcJs = path.join(conf.paths.src, '/**/!(*.spec).js');

preprocessors[pathSrcJs] = ['coverage'];
var pathSrcJs = path.join(conf.paths.src, '/**/!(*.spec).js');
preprocessors[pathSrcJs] = ['coverage'];
<% } else if (props.jsPreprocessor.key === 'coffee') { -%>
var pathTmpJs = path.join(conf.paths.tmp, '/**/!(*.spec).js');

preprocessors[pathTmpJs] = ['coverage'];
var pathTmpJs = path.join(conf.paths.tmp, '/**/!(*.spec).js');
preprocessors[pathTmpJs] = ['coverage'];
<% } else { -%>
var pathTmpJs = path.join(conf.paths.tmp, '/serve/app/index.module.js');

preprocessors[pathTmpJs] = ['coverage'];
var pathTmpJs = path.join(conf.paths.tmp, '/serve/app/index.module.js');
preprocessors[pathTmpJs] = ['coverage'];
<% } -%>
configuration.resporters.push('coverage');
}

configuration.preprocessors = preprocessors;

Expand Down

0 comments on commit 868505a

Please sign in to comment.