-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.conf.js
52 lines (43 loc) · 1.43 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
var webpackTestConfig = require('./webpack.test.js');
module.exports = function(config) {
config.set({
basePath: '.',
frameworks: ['mocha',],
browsers: ['Chrome', 'Firefox'],
preprocessors: {
// add webpack as preprocessor
'tests/*_test.js': [ 'webpack' ],
'tests/**/*_test.js': [ 'webpack' ]
},
files: [
// all files ending in "_test"
{ pattern: 'tests/*_test.js', watched: false },
{ pattern: 'tests/**/*_test.js', watched: false }
// each file acts as entry point for the webpack configuration
],
plugins: [
'karma-firefox-launcher', 'karma-chrome-launcher',
'karma-chai', 'karma-mocha',
'karma-sourcemap-loader', 'karma-webpack', 'karma-coverage',
'karma-mocha-reporter', 'karma-coverage-istanbul-reporter'
],
webpack: webpackTestConfig,
reporters: ['progress', 'coverage-istanbul'],
coverageIstanbulReporter: {
reporters : [
{
type : 'html',
dir : '.fecoverage/'
},
{
type: 'json',
dir: '.fecoverage/'
},
{type: 'lcov'}
],
fixWebpackSourcePaths: true
},
watch: true,
singleRun: false
});
};