add svg mock to jest config (#21296)

* add svg mock to jest config

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix svg mock better

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-03 17:43:21 +01:00 committed by GitHub
parent 9223d93450
commit b80a2cbd18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,7 +176,8 @@
],
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/cssMock.js",
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
"\\.(gif|png|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
"\\.svg$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/svg.js",
"\\$webapp/i18n/languages.json": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/languages.json",
"^browser-request$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/browser-request.js",
"^react$": "<rootDir>/node_modules/react",