1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

One less google dependency

This commit is contained in:
heyarne 2019-12-21 11:40:54 +01:00
commit 495a1e4f83
4 changed files with 40 additions and 9 deletions

View file

@ -1,6 +1,23 @@
const { execSync } = require('child_process')
module.exports = function (config) {
let browsers = null;
if (process.env.TRAVIS || process.env.CI) {
// custom config for continuous integration
browsers = ['ChromeHeadlessCI']
} else {
try {
// if Firefox is installed, use that as the test runner
execSync('which firefox')
browsers = ['FirefoxHeadless']
} catch (_) {
browsers = ['ChromeHeadless']
}
}
const configuration = {
browsers: ['ChromeHeadless'],
browsers: browsers,
// The tests are sometimes run before the tests were completely written
// to disc; this is a known problem unfortunately. This is a hack to at
// least keep the browsers connected so the tests are compiled and run
@ -15,6 +32,7 @@ module.exports = function (config) {
plugins: [
'karma-cljs-test',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-notify-reporter' // reporters are set in package.json
],
colors: true,
@ -31,10 +49,5 @@ module.exports = function (config) {
}
}
if (process.env.TRAVIS || process.env.CI) {
configuration.browsers = ['ChromeHeadlessCI']
}
config.set(configuration)
}