diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index 94ea91c6c0f3..341db2428574 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -28,7 +28,12 @@ const reporters = ['dots'] const detectBrowsers = { usePhantomJS: false, postDetection(availableBrowser) { - if (process.env.CI === true || availableBrowser.includes('Chrome')) { + // On CI just use Chrome + if (process.env.CI === true) { + return ['ChromeHeadless'] + } + + if (availableBrowser.includes('Chrome')) { return ['ChromeHeadless'] } @@ -44,13 +49,6 @@ const detectBrowsers = { } } -const customLaunchers = { - FirefoxHeadless: { - base: 'Firefox', - flags: ['-headless'] - } -} - let files = [ 'node_modules/popper.js/dist/umd/popper.min.js', 'node_modules/hammer-simulator/index.js' @@ -77,7 +75,6 @@ if (BUNDLE) { 'karma-firefox-launcher', 'karma-detect-browsers' ) - conf.customLaunchers = customLaunchers conf.detectBrowsers = detectBrowsers files = [...files, JQUERY_FILE, @@ -114,7 +111,6 @@ if (BUNDLE) { 'js/coverage/dist/tooltip.js', // include all of our js/dist files except util.js, index.js and tooltip.js 'js/coverage/dist/!(util|index|tooltip).js'] - conf.customLaunchers = customLaunchers conf.detectBrowsers = detectBrowsers if (!USE_OLD_JQUERY) { plugins.push('karma-coverage-istanbul-reporter')