Fix jest tests (#33688)

As of https://github.com/element-hq/element-web/pull/33573 (some?)
jest tests fail with "SyntaxError: Cannot use import statement outside a module"
when importing js-sdk. It removes js-sdk from moduleNameMapper in jest config
although I'm not sure why. This puts it back so js-sdk resolves to the
copy linked by our pnpm link script, which also makes get transformed.
This commit is contained in:
David Baker
2026-06-02 09:25:52 +01:00
committed by GitHub
parent bd1b5b492d
commit 1b52311f2e
+1
View File
@@ -35,6 +35,7 @@ const config: Config = {
"\\.(gif|png|ttf|woff2)$": "<rootDir>/__mocks__/imageMock.js",
"\\.svg$": "<rootDir>/__mocks__/svg.js",
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json",
"^matrix-js-sdk(.*)$": "<rootDir>/../../node_modules/matrix-js-sdk$1",
"^react$": "<rootDir>/node_modules/react",
"^react-dom$": "<rootDir>/node_modules/react-dom",
"decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",