mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	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.
		
			
				
	
	
		
			7 lines
		
	
	
		
			209 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
		
			209 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import * as languageHandler from "../src/languageHandler";
 | 
						|
 | 
						|
languageHandler.setLanguage('en');
 | 
						|
languageHandler.setMissingEntryGenerator(key => key.split("|", 2)[1]);
 | 
						|
 | 
						|
require('jest-fetch-mock').enableMocks();
 |