forked from angular/watchtower.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
50 lines (42 loc) · 1.31 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
var sharedConfig = require('pipe/karma');
module.exports = function(config) {
sharedConfig(config);
config.set({
files: [
'test/test.js',
{ pattern: 'src/**/*.js', included: false },
{ pattern: 'test/**/matchers.js', included: false },
{ pattern: 'test/**/helpers.js', included: false },
{ pattern: 'test/**/*spec.js', included: false },
{ pattern: 'node_modules/es6-shim/es6-shim.js', included: false },
{ pattern: 'node_modules/rtts-assert/src/**/*.js', included: false }
],
reporters: ['dots', 'coverage'],
preprocessors: {
'src/**/*.js': ['traceur', 'coverage'],
'test/**/*.spec.js': ['traceur'],
'test/matchers.js': ['traceur'],
'test/helpers.js': ['traceur'],
'node_modules/rtts-assert/src/**/*.js': ['traceur']
},
coverageReporter: {
reporters: [
{ type: 'text' },
{ type: 'lcovonly' }
]
}
});
config.sauceLabs.testName = 'AngularJS v2 - watchtower';
function arrayRemove(array, item) {
var index = array.indexOf(item);
if (index >= 0) {
array.splice(index, 1);
}
}
if (process.argv.indexOf('--debug') >= 0) {
arrayRemove(config.reporters, 'coverage');
for (var key in config.preprocessors) {
arrayRemove(config.preprocessors[key], 'coverage');
}
}
}