Fix Karma/Webpack so it can build the tests

This commit is contained in:
Travis Ralston 2018-10-25 15:21:18 -06:00
parent e8cb636631
commit 54ff5d8f25

View file

@ -199,12 +199,25 @@ module.exports = function (config) {
'matrix-react-sdk': path.resolve('test/skinned-sdk.js'), 'matrix-react-sdk': path.resolve('test/skinned-sdk.js'),
'sinon': 'sinon/pkg/sinon.js', 'sinon': 'sinon/pkg/sinon.js',
// To make webpack happy
// Related: https://github.com/request/request/issues/1529
// (there's no mock available for fs, so we fake a mock by using
// an in-memory version of fs)
"fs": "memfs",
}, },
modules: [ modules: [
path.resolve('./test'), path.resolve('./test'),
"node_modules" "node_modules"
], ],
}, },
node: {
// Because webpack is made of fail
// https://github.com/request/request/issues/1529
// Note: 'mock' is the new 'empty'
net: 'mock',
tls: 'mock'
},
devtool: 'inline-source-map', devtool: 'inline-source-map',
externals: { externals: {
// Don't try to bundle electron: leave it as a commonjs dependency // Don't try to bundle electron: leave it as a commonjs dependency