-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
50 lines (38 loc) · 1.23 KB
/
karma.conf.js
File metadata and controls
50 lines (38 loc) · 1.23 KB
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 reporters = [,'mocha','kjhtml'];
var webpackConfig;
var isLocalTesting = true;
if(process.env.NODE_ENV == "test" || process.env.NODE_ENV == "testing") // this means it is not a local test environment
{
reporters = reporters.concat(['coverage','remap-coverage']);
isLocalTesting = false;
}
webpackConfig = require("./webpack/test.config")({env:"test", isLocalTesting:isLocalTesting})
module.exports = function(config) {
config.set({
basePath: '',
autoWatch: true,
autoWatchBatchDelay:300,
singleRun: false,
frameworks: ['jasmine'],
files:[
{pattern: './karma-test-shim.js', watched: false}],
reporters: reporters,
preprocessors: {
'./karma-test-shim.js': ['coverage','webpack','sourcemap']
},
webpack: webpackConfig,
coverageReporter: {
type: 'in-memory'
},
remapCoverageReporter: {
'text-summary': null,
lcovonly:"./coverage/lcov.info",
html: './coverage/html',
cobertura: './coverage/cobertura/cobertura-coverage.xml'
},
browserConsoleLogOptions: {
level: 'log',
terminal: true
}
});
};