Skip to content

Commit

Permalink
disable code coverage when testing on SauceLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Oct 4, 2018
1 parent 0a79401 commit db6961f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,17 @@ function exitIfDisabled () {
* Configures the code-coverage reporter
*/
function configureCodeCoverage (config) {
if (process.argv.indexOf('--coverage') === -1) {
var coverage = process.argv.indexOf('--coverage') > 0;
var SAUCE = process.env.SAUCE === 'true';

if (!coverage) {
console.warn('Code-coverage is not enabled');
return;
}
else if (SAUCE) {
console.warn('Code-coverage is disabled for SauceLabs');
return;
}

config.reporters.push('coverage');
config.coverageReporter = {
Expand Down

0 comments on commit db6961f

Please sign in to comment.