From 795986f14695965621a8bfed91cca22cf6e4c763 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 16 Jun 2016 07:39:34 +0100 Subject: [PATCH] Karma: fix warning by ignoring olm If olm is not installed, the webpack build for the karma tests gives an ugly error. None of the tests currently care if olm is installed or not, so fix this for now by just ignoring the olm module. --- karma.conf.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 971e9682..f05186af 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -36,7 +36,7 @@ module.exports = function (config) { proxies: { "/img/": "/base/vector/img/", }, - + // preprocess matching files before serving them to the browser // available preprocessors: // https://npmjs.org/browse/keyword/karma-preprocessor @@ -123,7 +123,7 @@ module.exports = function (config) { // same goes for js-sdk "matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'), - + sinon: 'sinon/pkg/sinon.js', }, root: [ @@ -131,6 +131,11 @@ module.exports = function (config) { path.resolve('./test'), ], }, + plugins: [ + // olm may not be installed, so avoid webpack warnings by + // ignoring it. + new webpack.IgnorePlugin(/^olm$/), + ], devtool: 'inline-source-map', }, });