diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-02-24 16:34:36 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-02-26 14:04:04 +0300 |
commit | 7933ee32821bbdf606be5e2d526b27a05934b53b (patch) | |
tree | e4d497cd111042620a468928aed3d38dfdcf871c /js/tests | |
parent | 497518db1a517d2c775516f4c5b952241147a965 (diff) |
karma.conf.js: minor simplification.
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/karma.conf.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index 4183197c14..46df7ae106 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -8,10 +8,12 @@ const { browsersKeys } = 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 bundle = process.env.BUNDLE === 'true' -const browserStack = process.env.BROWSER === 'true' -const debug = process.env.DEBUG === 'true' const frameworks = [ 'qunit', @@ -28,7 +30,7 @@ const reporters = ['dots'] const detectBrowsers = { usePhantomJS: false, 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'] } @@ -83,8 +85,8 @@ if (bundle) { } else if (browserStack) { conf.hostname = ip.address() conf.browserStack = { - username: process.env.BROWSER_STACK_USERNAME, - accessKey: process.env.BROWSER_STACK_ACCESS_KEY, + username: env.BROWSER_STACK_USERNAME, + accessKey: env.BROWSER_STACK_ACCESS_KEY, build: `bootstrap-${new Date().toISOString()}`, project: 'Bootstrap', retryLimit: 2 |