-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
33 lines (32 loc) · 815 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
var webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.entry = {};
module.exports = function (config) {
config.set({
browsers: [ 'Chrome' ],
// karma only needs to know about the test bundle
files: [
'tests.bundle.js',
],
frameworks: [ 'chai', 'mocha' ],
plugins: [
'karma-chrome-launcher',
'karma-chai',
'karma-mocha',
'karma-mocha-reporter',
'karma-sourcemap-loader',
'karma-webpack'
],
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'./tests.bundle.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ 'mocha' ],
singleRun: true,
// webpack config object
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
}
});
};