-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
56 lines (48 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
53
54
55
56
var webpack = require('webpack');
module.exports = function(config) {
config.set({
files: [
// all files ending in 'test'
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'test/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/test.js': ['webpack']
},
reporters: ['spec', 'coverage'],
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
webpack: {
// webpack configuration
module: {
loaders: [
{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }
],
postLoaders: [{
test: /\.js/,
exclude: /(test|node_modules)/,
loader: 'istanbul-instrumenter'
}]
},
resolve: {
modulesDirectories: [
'',
'src',
'node_modules'
]
}
},
webpackMiddleware: {
// webpack-dev-middleware configuration
noInfo: true
},
browsers: ['PhantomJS']
});
};