This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
/
karma.sauce.conf.js
71 lines (57 loc) · 1.76 KB
/
karma.sauce.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
62
63
64
65
66
67
68
69
70
71
// Karma configuration
module.exports = function (config) {
require('./karma.conf')(config);
// Configuration based on: https://github.com/jashkenas/backbone/blob/master/karma.conf-sauce.js
var _ = require('underscore');
// Browsers to run on Sauce Labs platforms
var sauceBrowsers = _.reduce([
['firefox', 'dev', 'Windows 10'],
['firefox', 'beta', 'Windows 10'],
['firefox', '49', 'Windows 10'],
['chrome', 'dev', 'Windows 10'],
['chrome', 'beta', 'Windows 10'],
['chrome', '50', 'Windows 10']
], function (memo, platform) {
// internet explorer -> ie
var label = platform[0].split(' ');
if (label.length > 1) {
label = _.invoke(label, 'charAt', 0)
}
label = (label.join("") + '_v' + platform[1]).replace(' ', '_').toUpperCase();
memo[label] = {
'base': 'SauceLabs',
'browserName': platform[0],
'version': platform[1],
'platform': platform[2]
};
return memo;
}, {});
config.set({
captureTimeout: 240000,
browserNoActivityTimeout: 120000,
sauceLabs: {
testName: 'ng2-material',
startConnect: true,
recordVideo: false,
recordScreenshots: false,
options: {
'selenium-version': '2.53.0',
'command-timeout': 600,
'idle-timeout': 600,
'max-duration': 5400
}
},
customLaunchers: sauceBrowsers,
browsers: Object.keys(sauceBrowsers),
reporters: ['mocha', 'saucelabs', 'coverage'],
singleRun: true,
transports:['polling'],
plugins: [
'karma-*'
]
});
if (process.env.TRAVIS) {
config.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
}
};