From 766b748a58b9936f55b13a35e12274b24e88c099 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sun, 14 Feb 2016 09:48:24 -0500 Subject: [PATCH] Run coverage properly on the CI --- karma.coverage.conf.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/karma.coverage.conf.js b/karma.coverage.conf.js index ba75445aa..dd70f701a 100644 --- a/karma.coverage.conf.js +++ b/karma.coverage.conf.js @@ -1,6 +1,6 @@ module.exports = function(config) { - config.set({ - browsers: ['Chrome', 'Firefox'], + var configuration = { + browsers: ['Firefox'], frameworks: ['browserify', 'jasmine'], @@ -24,5 +24,20 @@ module.exports = function(config) { { type: 'lcovonly', subdir: '.', file: 'lcov.info' } ] } - }); + }; + + // If on the CI, use the CI chrome launcher + if (process.env.TRAVIS) { + configuration.browsers.push('Chrome_travis_ci'); + configuration.customLaunchers = { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }; + } else { + configuration.browsers.push('Chrome'); + } + + config.set(configuration); }; \ No newline at end of file -- 2.47.2