-
Notifications
You must be signed in to change notification settings - Fork 93
/
karma-browserstack.conf.js
61 lines (48 loc) · 1.27 KB
/
karma-browserstack.conf.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* eslint-env node */
const browserStack = require('../../.browserstack.json');
const customLaunchers = [{
base: 'BrowserStack',
browser: 'firefox',
browser_version: '52.0',
os: 'Windows',
os_version: '10',
}, {
base: 'BrowserStack',
browser: 'chrome',
browser_version: '56.0',
os: 'Windows',
os_version: '10',
}, {
base: 'BrowserStack',
browser: 'safari',
browser_version: '10.1',
os: 'OS X',
os_version: 'Sierra',
}].reduce((acc, browser, i) => {
acc[i] = browser;
return acc;
}, {});
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'browserify', 'source-map-support'],
files: ['src/js/test/index.js', 'src/js/test/**/*.js'],
preprocessors: {
'src/js/**/*.js': ['browserify'],
},
// http://stackoverflow.com/a/42379383/786644
browserConsoleLogOptions: {
terminal: true,
level: '',
},
autoWatch: false,
singleRun: true,
browserify: {
debug: true,
transform: ['babelify'],
},
browserNoActivityTimeout: 5 * 60 * 1000, // 5 minutes
browserStack,
customLaunchers,
browsers: Object.keys(customLaunchers),
});
};