forked from strawdynamics/drift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karmaConfig.js
62 lines (57 loc) · 1.92 KB
/
karmaConfig.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
62
const baseConfig = {
frameworks: ['browserify', 'jasmine'],
files: [
{pattern: 'src/**/*.js', included: false, served: false},
'test/**/test*.js'
],
preprocessors: {
'src/**/*.js': 'browserify',
'test/**/*.js': 'browserify',
},
browserify: {
transform: [
'babelify',
]
},
concurrency: 5,
captureTimeout: 90000,
browserConnectTimeout: 3000,
browserNoActivityTimeout: 15000,
};
const stringConfig = JSON.stringify(baseConfig);
var headlessConfig = JSON.parse(stringConfig);
headlessConfig.browsers = ['PhantomJS'];
var localConfig = JSON.parse(stringConfig);
localConfig.browsers = ['Chrome', 'Firefox'];
var fullConfig = JSON.parse(stringConfig);
fullConfig.reporters = ['progress', 'saucelabs'];
fullConfig.saucelabs = { testName: 'Drift Tests' }
fullConfig.browsers = [
'sl_chrome',
'sl_safari_9',
'sl_safari_8',
'sl_firefox_42',
'sl_firefox_41',
'sl_ie_11',
'sl_ie_10',
'sl_ios_9',
'sl_ios_8',
'sl_android_5',
'sl_android_4',
];
fullConfig.customLaunchers = {
sl_chrome: { base: 'SauceLabs', browserName: 'Chrome' },
sl_safari_9: { base: 'SauceLabs', browserName: 'Safari', version: 9 },
sl_safari_8: { base: 'SauceLabs', browserName: 'Safari', version: 8 },
sl_firefox_42: { base: 'SauceLabs', browserName: 'Firefox', version: 42 },
sl_firefox_41: { base: 'SauceLabs', browserName: 'Firefox', version: 41 },
sl_ie_11: { base: 'SauceLabs', browserName: 'Internet Explorer', version: '11' },
sl_ie_10: { base: 'SauceLabs', browserName: 'Internet Explorer', version: '10' },
sl_ios_9: { base: 'SauceLabs', browserName: 'iPhone', version: '9.2' },
sl_ios_8: { base: 'SauceLabs', browserName: 'iPhone', version: '8.4' },
sl_android_5: { base: 'SauceLabs', browserName: 'Android', version: '5.1' },
sl_android_4: { base: 'SauceLabs', browserName: 'Android', version: '4.4' },
};
exports.headless = headlessConfig;
exports.local = localConfig;
exports.full = fullConfig;