From 66966eecf82cd0b2182a43f7e976cfb33907d7c6 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 21 Apr 2016 08:10:58 +0100 Subject: [PATCH] Make sure we only have one React in tests Otherwise if we symlink in react-gemini-scrollbar, React gets very confused --- karma.conf.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/karma.conf.js b/karma.conf.js index 0abbddb71b..52eea45f12 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -147,6 +147,11 @@ module.exports = function (config) { }, resolve: { alias: { + // alias any requires to the react module to the one in our + // path, otherwise we tend to get the react source included + // twice when using npm link. + react: path.resolve('./node_modules/react'), + 'matrix-react-sdk': path.resolve('test/skinned-sdk.js'), 'sinon': 'sinon/pkg/sinon.js', },