-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
66 lines (51 loc) · 1.22 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
// Karma configuration
// Generated on Tue Jun 27 2017 13:36:04 GMT+0100 (GMT Daylight Time)
var webpackConfig = require('./webpack.test.config');
module.exports = function (config) {
let originalConfig = {
client: {
args: ['--test-target', config.testTarget],
jasmine: {
// timeoutInterval: 1000
// timeoutInterval: 60 * 60 * 1000
}
},
basePath: '',
frameworks: ['jasmine'],
files: [{
pattern: './testing/karma-test-shim.js',
watched: false
}],
preprocessors: {
'./testing/karma-test-shim.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
reporters: ['kjhtml', 'mocha', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
browserDisconnectTimeout : 0,
browserNoActivityTimeout : 0,
singleRun: true,
concurrency: Infinity
};
if (config.testTarget === 'npm') {
originalConfig.files = [{
pattern: './testing/karma-test-shim-npm.js',
watched: false
}];
originalConfig.preprocessors = {
'./testing/karma-test-shim-npm.js': ['webpack', 'sourcemap']
};
}
config.set(originalConfig);
}