mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 18:54:30 +01:00
Simplify karma.conf.js (#33045)
`customLaunchers` does not seem to be needed.
This commit is contained in:
parent
92434fa30f
commit
324107f3af
@ -33,7 +33,12 @@ const reporters = ['dots']
|
|||||||
const detectBrowsers = {
|
const detectBrowsers = {
|
||||||
usePhantomJS: false,
|
usePhantomJS: false,
|
||||||
postDetection(availableBrowser) {
|
postDetection(availableBrowser) {
|
||||||
if (ENV.CI === true || availableBrowser.includes('Chrome')) {
|
// On CI just use Chrome
|
||||||
|
if (ENV.CI === true) {
|
||||||
|
return ['ChromeHeadless']
|
||||||
|
}
|
||||||
|
|
||||||
|
if (availableBrowser.includes('Chrome')) {
|
||||||
return DEBUG ? ['Chrome'] : ['ChromeHeadless']
|
return DEBUG ? ['Chrome'] : ['ChromeHeadless']
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,13 +54,6 @@ const detectBrowsers = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const customLaunchers = {
|
|
||||||
FirefoxHeadless: {
|
|
||||||
base: 'Firefox',
|
|
||||||
flags: ['-headless']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const conf = {
|
const conf = {
|
||||||
basePath: '../..',
|
basePath: '../..',
|
||||||
port: 9876,
|
port: 9876,
|
||||||
@ -124,7 +122,6 @@ if (BROWSERSTACK) {
|
|||||||
'karma-firefox-launcher',
|
'karma-firefox-launcher',
|
||||||
'karma-detect-browsers'
|
'karma-detect-browsers'
|
||||||
)
|
)
|
||||||
conf.customLaunchers = customLaunchers
|
|
||||||
conf.detectBrowsers = detectBrowsers
|
conf.detectBrowsers = detectBrowsers
|
||||||
conf.files = [
|
conf.files = [
|
||||||
'node_modules/jquery/dist/jquery.slim.min.js',
|
'node_modules/jquery/dist/jquery.slim.min.js',
|
||||||
@ -142,7 +139,6 @@ if (BROWSERSTACK) {
|
|||||||
'karma-coverage-istanbul-reporter'
|
'karma-coverage-istanbul-reporter'
|
||||||
)
|
)
|
||||||
reporters.push('coverage-istanbul')
|
reporters.push('coverage-istanbul')
|
||||||
conf.customLaunchers = customLaunchers
|
|
||||||
conf.detectBrowsers = detectBrowsers
|
conf.detectBrowsers = detectBrowsers
|
||||||
conf.coverageIstanbulReporter = {
|
conf.coverageIstanbulReporter = {
|
||||||
dir: path.resolve(__dirname, '../coverage/'),
|
dir: path.resolve(__dirname, '../coverage/'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user