From ab16457d9041faa28ebc9e99fd582f83b82b2a96 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 2 Sep 2017 17:17:26 +0200 Subject: [PATCH] Do not calculate coverage when running tests locally Having the coverage calculation code in the test files makes it hard to debug tests, so it is better to only analyze coverage on Travis, and not locally. --- test/karma.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/karma.config.js b/test/karma.config.js index 66e6592ed6..90a077c966 100644 --- a/test/karma.config.js +++ b/test/karma.config.js @@ -57,13 +57,7 @@ module.exports = function(karma) { '/rendering/': '/base/rendering/', '/spec/': '/base/spec/' }, - preprocessors: { - // source files, that you wanna generate coverage for - // do not include tests or libraries - // (these files will be instrumented by Istanbul) - '../src/**/*.js': ['coverage'] - }, - reporters: ['progress', 'coverage'], + reporters: ['progress'], coverageReporter: { reporters: [ { @@ -125,6 +119,12 @@ module.exports = function(karma) { browserNoActivityTimeout: 240000, customLaunchers: customLaunchers, browsers: Object.keys(customLaunchers), + preprocessors: { + // source files, that you wanna generate coverage for + // do not include tests or libraries + // (these files will be instrumented by Istanbul) + '../src/**/*.js': ['coverage'] + }, coverageReporter: { reporters: [ {