From a8030ae7694d4a6ce8bb8a15ba809c28ce25b2a5 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sat, 15 Oct 2016 17:58:26 -0400 Subject: [PATCH] Duplicating JS webpack config for karma This remove the implicit dependency on bourbon for running the karma tests --- karma.conf.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 6d72605..f8041b6 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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') + } + ] + } } }); };