This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
64 lines (53 loc) · 1.81 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
module.exports = function(config) {
var settings = {
basePath: '',
frameworks: ['mocha', 'browserify', 'es5-shim', 'sinon'],
files: [
'node_modules/normalize.css/normalize.css',
'test/**/*.test.js'
],
reporters: ['progress'],
preprocessors: {
'test/**/*.test.js': 'browserify'
},
browserify: {
bundle: true,
watch: true,
plugin: [require('proxyquireify').plugin],
debug: true
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
captureTimeout: 60000,
singleRun: false,
plugins: ['karma-*']
};
if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
settings.browserDisconnectTimeout = 60000;
settings.browserNoActivityTimeout = 60000;
settings.captureTimeout = 60000 * 3;
settings.autoWatch = false;
settings.sauceLabs = {
testName: 'Gardr ext',
tags: ['gardr', 'ext']
};
settings.reporters = ['dots', 'saucelabs'];
settings.customLaunchers = {};
// only 3 vmms / browsers per run because of
var key = process.env.BROWSER_TYPE;
var target = require('./ci-browsers.js')[key];
if (!target) {
console.error('Missing / Unknown BROWSER_TYPE ' + process.env.BROWSER_TYPE);
process.exit(1);
}
Object.keys(target).forEach(function(key){
settings.customLaunchers[key] = target[key];
});
console.log('Running CI tests on', Object.keys(settings.customLaunchers).join(', '));
settings.browsers = Object.keys(settings.customLaunchers);
}
config.set(settings);
};