detected.js
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var common = require('./common');
// Runs default testing configuration in multiple environments.
module.exports = function(config) {
// Travis CI should run in its available Firefox headless browser.
if (process.env.TRAVIS) {
config.set(common({
browsers: ['Firefox'],
plugins: ['karma-firefox-launcher']
}))
} else {
config.set(common({
frameworks: ['detectBrowsers'],
plugins: [
'karma-chrome-launcher',
'karma-detect-browsers',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-safari-launcher'
],
detectBrowsers: {
// disable safari as it was not previously supported and causes test failures
postDetection: function(availableBrowsers) {
var safariIndex = availableBrowsers.indexOf('Safari');
if(safariIndex !== -1) {
availableBrowsers.splice(safariIndex, 1);
}
return availableBrowsers;
},
usePhantomJS: false
}
}));
}
};