forked from manguezal/new-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
33 lines (32 loc) · 881 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.target = "node";
module.exports = function (config) {
config.set({
browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ],
// karma only needs to know about the test bundle
files: [
'tests.bundle.js'
],
frameworks: [ 'chai', 'mocha' ],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
],
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'tests.bundle.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ 'dots' ],
singleRun: true,
// webpack config object
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
}
});
};