-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
52 lines (44 loc) · 1.11 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 webpack = require("webpack");
module.exports = function(config) {
config.set({
files: [
// all files ending in "test"
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'test/**/*.js'
// each file acts as entry point for the webpack configuration
],
// frameworks to use
frameworks: ['mocha'],
preprocessors: {
// only specify one entry point
// and require all tests in there
'test/**/*.js': ['webpack']
},
reporters: ['mocha', 'coverage'],
coverageReporter: {
dir: 'build/coverage/',
reporters: [
{type: 'html', subdir: 'report-html'},
{type: 'text-summary'}
]
},
webpack: {
// webpack configuration
module: {
loaders: [
{test: /\.js$/, loader: "babel"}
],
postLoaders: [{
test: /\.js/,
exclude: /(test|node_modules|bower_components)/,
loader: 'istanbul-instrumenter'
}]
}
},
webpackMiddleware: {
// webpack-dev-middleware configuration
noInfo: true
},
browsers: ['PhantomJS']
});
};