-
Notifications
You must be signed in to change notification settings - Fork 91
/
karma.conf.js
34 lines (33 loc) · 938 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
34
var webpackConfig = require('./webpack.config.js');
module.exports = function (config) {
config.set({
browsers: [ 'PhantomJS' ],
captureTimeout: 60000,
browserNoActivityTimeout: 60000, // We need to accept that Webpack may take a while to build!
singleRun: true,
colors: true,
frameworks: [ 'mocha', 'sinon', 'chai' ], // Mocha is our testing framework of choice
files: [
'./tests.webpack.js',
],
preprocessors: {
'tests.webpack.js': [ 'webpack' ] // Preprocess with webpack and our sourcemap loader
},
reporters: [ 'mocha' ],
webpack: { // Simplified Webpack configuration
entry: webpackConfig.entry,
module: {
rules: webpackConfig.module.rules,
noParse: [
/node_modules\/sinon/,
]
},
node: {
fs: 'empty'
}
},
webpackServer: {
noInfo: true // We don't want webpack output
}
});
};