forked from klokantech/maputnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
34 lines (30 loc) · 831 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');
// Karma configuration
module.exports = function(config) {
var browsers = ['Chrome'];
if (process.env.TRAVIS) {
browsers = ['Firefox'];
}
config.set({
browsers: browsers,
frameworks: ['mocha'],
// ... normal karma configuration
files: [
// all files ending in "_test"
{pattern: 'test/*_test.js', watched: false},
{pattern: 'test/**/*_test.js', watched: false}
// each file acts as entry point for the webpack configuration
],
preprocessors: {
// add webpack as preprocessor
'test/*_test.js': ['webpack'],
'test/**/*_test.js': ['webpack']
},
webpack: webpackConfig,
webpackMiddleware: {
// webpack-dev-middleware configuration
// i. e.
stats: 'errors-only'
}
});
};