maputnik/karma.conf.js

35 lines
831 B
JavaScript
Raw Normal View History

2016-11-23 14:38:09 +01:00
var webpackConfig = require('./webpack.config.js');
// Karma configuration
module.exports = function(config) {
2016-11-23 16:33:03 +01:00
var browsers = ['Chrome'];
if (process.env.TRAVIS) {
browsers = ['Firefox'];
}
2016-11-23 14:38:09 +01:00
config.set({
2016-11-23 16:33:03 +01:00
browsers: browsers,
frameworks: ['mocha'],
2016-11-23 14:38:09 +01:00
// ... 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'
}
});
};