-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
67 lines (65 loc) · 1.43 KB
/
karma.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
module.exports = (config) => {
const customLaunchers = {
'SL Chrome 49': {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Linux',
version: '49',
},
'SL Edge 13': {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: '13',
},
'SL Firefox 42': {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Linux',
version: '42',
},
'SL Safari 10': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '10',
},
};
config.set({
browserify: {
debug: true,
plugin: [
'proxyquire-universal',
[
'browserify-wrap',
{
prefix: `
window.open = function () {};
(function () {
var location = 'http://foo.share/';
var screen = { width: 1920, height: 1080 };
`,
suffix: `
})();
`,
},
],
],
},
files: [{pattern: 'test/*', type: 'js'}],
frameworks: ['browserify', 'chai', 'mocha', 'sinon'],
preprocessors: {
'test/*': ['browserify'],
},
reporters: ['dots'],
singleRun: true,
});
if (!config.local) {
config.set({
browsers: Object.keys(customLaunchers),
concurrency: 1,
customLaunchers,
reporters: [...config.reporters, 'saucelabs'],
});
}
};