-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
47 lines (39 loc) · 986 Bytes
/
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
module.exports = function karmaConfig (config) {
config.set({
frameworks: [
'jasmine'
],
reporters: [
'progress',
'coverage'
],
files: [
'test/**/*.spec.js',
'test/**/*.spec.ts',
],
preprocessors: {
'test/**/*.spec.js': ['webpack', 'sourcemap'],
'test/**/*.spec.ts': ['webpack', 'sourcemap']
},
browsers: [
'PhantomJS'
],
singleRun: true,
coverageReporter: {
dir: 'coverage/',
reporters: [
{type: 'text-summary'},
{type: 'html'}
]
},
// Use the standard webpack configuration, but remove the CommonsChunkPlugin
// (see https://github.com/webpack-contrib/karma-webpack/issues/22)
webpack: function(config) {
config.plugins = config.plugins.filter(p => p.constructor.name != 'CommonsChunkPlugin')
return config;
}(require('./webpack.config')),
webpackMiddleware: {
noInfo: 'errors-only'
}
});
};