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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user