mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-02 02:29:24 +01:00
karma.conf.js: minor simplification.
This commit is contained in:
parent
497518db1a
commit
7933ee3282
@ -8,10 +8,12 @@ const {
|
|||||||
browsersKeys
|
browsersKeys
|
||||||
} = require('./browsers')
|
} = require('./browsers')
|
||||||
|
|
||||||
|
const env = process.env
|
||||||
|
const bundle = env.BUNDLE === 'true'
|
||||||
|
const browserStack = env.BROWSER === 'true'
|
||||||
|
const debug = env.DEBUG === 'true'
|
||||||
|
|
||||||
const jqueryFile = 'node_modules/jquery/dist/jquery.slim.min.js'
|
const jqueryFile = 'node_modules/jquery/dist/jquery.slim.min.js'
|
||||||
const bundle = process.env.BUNDLE === 'true'
|
|
||||||
const browserStack = process.env.BROWSER === 'true'
|
|
||||||
const debug = process.env.DEBUG === 'true'
|
|
||||||
|
|
||||||
const frameworks = [
|
const frameworks = [
|
||||||
'qunit',
|
'qunit',
|
||||||
@ -28,7 +30,7 @@ const reporters = ['dots']
|
|||||||
const detectBrowsers = {
|
const detectBrowsers = {
|
||||||
usePhantomJS: false,
|
usePhantomJS: false,
|
||||||
postDetection(availableBrowser) {
|
postDetection(availableBrowser) {
|
||||||
if (typeof process.env.TRAVIS_JOB_ID !== 'undefined' || availableBrowser.includes('Chrome')) {
|
if (typeof env.TRAVIS_JOB_ID !== 'undefined' || availableBrowser.includes('Chrome')) {
|
||||||
return debug ? ['Chrome'] : ['ChromeHeadless']
|
return debug ? ['Chrome'] : ['ChromeHeadless']
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,8 +85,8 @@ if (bundle) {
|
|||||||
} else if (browserStack) {
|
} else if (browserStack) {
|
||||||
conf.hostname = ip.address()
|
conf.hostname = ip.address()
|
||||||
conf.browserStack = {
|
conf.browserStack = {
|
||||||
username: process.env.BROWSER_STACK_USERNAME,
|
username: env.BROWSER_STACK_USERNAME,
|
||||||
accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
|
accessKey: env.BROWSER_STACK_ACCESS_KEY,
|
||||||
build: `bootstrap-${new Date().toISOString()}`,
|
build: `bootstrap-${new Date().toISOString()}`,
|
||||||
project: 'Bootstrap',
|
project: 'Bootstrap',
|
||||||
retryLimit: 2
|
retryLimit: 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user