Duplicating JS webpack config for karma

This remove the implicit dependency on bourbon for running the karma
tests
This commit is contained in:
Jeff Avallone 2016-10-15 17:58:26 -04:00
parent bfda16f401
commit a8030ae769
1 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,3 @@
var webpack = require('./webpack.config.js');
module.exports = function(karma) {
karma.set({
frameworks: ['jasmine'],
@ -15,7 +13,23 @@ module.exports = function(karma) {
singleRun: false,
webpack: {
devtool: 'inline-source-map',
module: webpack.module
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel'
},
{
test: require.resolve('snapsvg'),
loader: 'imports-loader?this=>window,fix=>module.exports=0'
},
{
test: /\.peg$/,
loader: require.resolve('./lib/canopy-loader')
}
]
}
}
});
};