Skip to content

Commit 795986f

Browse files
committed
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.
1 parent 8cd4637 commit 795986f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎karma.conf.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = function (config) {
3636
proxies: {
3737
"/img/": "/base/vector/img/",
3838
},
39-
39+
4040
// preprocess matching files before serving them to the browser
4141
// available preprocessors:
4242
// https://npmjs.org/browse/keyword/karma-preprocessor
@@ -123,14 +123,19 @@ module.exports = function (config) {
123123

124124
// same goes for js-sdk
125125
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),
126-
126+
127127
sinon: 'sinon/pkg/sinon.js',
128128
},
129129
root: [
130130
path.resolve('./src'),
131131
path.resolve('./test'),
132132
],
133133
},
134+
plugins: [
135+
// olm may not be installed, so avoid webpack warnings by
136+
// ignoring it.
137+
new webpack.IgnorePlugin(/^olm$/),
138+
],
134139
devtool: 'inline-source-map',
135140
},
136141
});

0 commit comments

Comments
 (0)