mock out scss imports for jest

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/13329/head
Michael Telatynski 2020-04-22 18:58:44 +01:00
parent 918a56d01a
commit 6584ff29af
2 changed files with 2 additions and 0 deletions

1
__mocks__/cssMock.js Normal file
View File

@ -0,0 +1 @@
module.exports = "css-file-stub";

View File

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