1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Fix tests for new call path

We have to mock `fetch` for the caching of the download icon, and then mock out all the function calls used by components to feed a Media object.
This commit is contained in:
Travis Ralston
2021-03-11 09:42:55 -07:00
parent 90817f3bc6
commit 6ab235f10c
7 changed files with 40 additions and 0 deletions

View File

@ -2,3 +2,5 @@ import * as languageHandler from "../src/languageHandler";
languageHandler.setLanguage('en');
languageHandler.setMissingEntryGenerator(key => key.split("|", 2)[1]);
require('jest-fetch-mock').enableMocks();