Preprocessor to compile Webpack files on the fly.
npm install karma-webpack-preprocessor --save-dev
// karma.conf.js
module.exports = function(config) {
config.set({
// ...
files: [
'./app/**/*.spec.js',
],
preprocessors: {
['./app/**/*.spec.js']: ['webpack'],
},
webpackPreprocessor: {
configPath: './config/webpack'
},
/// ...
})
}