From a2e2c6b1ed9ec84a5e43cd62576888b64aaf2f0a Mon Sep 17 00:00:00 2001 From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com> Date: Fri, 25 Nov 2022 16:00:42 +0100 Subject: [PATCH] mock fontsource --- client/tests/jest/__mocks__/font.js | 1 + client/tests/jest/jest.config.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 client/tests/jest/__mocks__/font.js diff --git a/client/tests/jest/__mocks__/font.js b/client/tests/jest/__mocks__/font.js new file mode 100644 index 00000000000..ff8b4c56321 --- /dev/null +++ b/client/tests/jest/__mocks__/font.js @@ -0,0 +1 @@ +export default {}; diff --git a/client/tests/jest/jest.config.js b/client/tests/jest/jest.config.js index fb8f2627e9c..0e5f5934044 100644 --- a/client/tests/jest/jest.config.js +++ b/client/tests/jest/jest.config.js @@ -78,6 +78,7 @@ module.exports = { // Some of these should turn into true mocks, instead of this module name mapping hack. moduleNameMapper: { "\\.(css|scss)$": "/tests/jest/__mocks__/style.js", + "^@fontsource/.*": "/tests/jest/__mocks__/font.js", "^config$": "/tests/jest/__mocks__/config.js", "utils/localization$": "/tests/jest/__mocks__/localization.js", "viz/trackster$": "/tests/jest/__mocks__/trackster.js",