Skip to content

Instantly share code, notes, and snippets.

@adambray
Created May 1, 2018 20:52
Show Gist options
  • Save adambray/9526e2c96224f1d82e57565561ef7060 to your computer and use it in GitHub Desktop.
Save adambray/9526e2c96224f1d82e57565561ef7060 to your computer and use it in GitHub Desktop.
var webpack = require('webpack')
module.exports = function (config) {
config.set({
browsers: ['Chrome'], //run in Chrome
browserNoActivityTimeout: 60000,
singleRun: true, //just run once by default
frameworks: ['mocha'], //use the mocha test framework
files: [
'spec/tests.webpack.js' //just load this file
],
preprocessors: {
'spec/tests.webpack.js': ['webpack', 'sourcemap'], //preprocess with webpack and our sourcemap loader
},
reporters: ['nyan'], //report results in this format
mochaReporter: {
output: 'autowatch'
},
webpack: {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [
{test: /\.jsx?$/, loader: 'babel-loader'}
]
}
},
webpackServer: {
noInfo: true //please don't spam the console when running in karma!
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment