Skip to content

Commit

Permalink
Partially backport #33045
Browse files Browse the repository at this point in the history
Simplify karma.conf.js

`customLaunchers` does not seem to be needed.
  • Loading branch information
XhmikosR committed Feb 17, 2021
1 parent 23a26e1 commit c341721
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions js/tests/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}

Expand All @@ -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'
Expand All @@ -77,7 +75,6 @@ if (BUNDLE) {
'karma-firefox-launcher',
'karma-detect-browsers'
)
conf.customLaunchers = customLaunchers
conf.detectBrowsers = detectBrowsers
files = [...files,
JQUERY_FILE,
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit c341721

Please sign in to comment.