mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 18:58:56 -04:00 
			
		
		
		
	* make system config core singleton * refactor * fix tests * chore: fix tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
		
			
				
	
	
		
			15 lines
		
	
	
		
			387 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			387 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { ISystemConfigRepository, SystemConfigCore } from '@app/domain';
 | |
| 
 | |
| export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
 | |
|   if (reset) {
 | |
|     SystemConfigCore.reset();
 | |
|   }
 | |
| 
 | |
|   return {
 | |
|     load: jest.fn().mockResolvedValue([]),
 | |
|     readFile: jest.fn(),
 | |
|     saveAll: jest.fn().mockResolvedValue([]),
 | |
|     deleteKeys: jest.fn(),
 | |
|   };
 | |
| };
 |