0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Partially backport #33045

Simplify karma.conf.js

`customLaunchers` does not seem to be needed.
This commit is contained in:
XhmikosR 2021-02-16 13:12:23 +02:00
parent 23a26e12ff
commit c341721439

View File

@ -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')