From c70d21a92e53355c493eb8d602974a6ff14019bd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 15 Jan 2020 14:42:16 -0700 Subject: [PATCH] Force Jest to use exactly one copy of React and ReactDOM --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6705d390..3ba5ac37 100644 --- a/package.json +++ b/package.json @@ -202,7 +202,9 @@ "moduleNameMapper": { "\\.(gif|png|svg|ttf|woff2)$": "/node_modules/matrix-react-sdk/__mocks__/imageMock.js", "\\$webapp/i18n/languages.json": "/node_modules/matrix-react-sdk/__mocks__/languages.json", - "^browser-request$": "/node_modules/matrix-react-sdk/__mocks__/browser-request.js" + "^browser-request$": "/node_modules/matrix-react-sdk/__mocks__/browser-request.js", + "^react$": "/node_modules/react", + "^react-dom$": "/node_modules/react-dom" }, "transformIgnorePatterns": [ "/node_modules/(?!matrix-js-sdk).+$",