mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 18:58:56 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			544 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			544 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { IUserRepository, UserCore } from '@app/domain';
 | |
| 
 | |
| export const newUserRepositoryMock = (reset = true): jest.Mocked<IUserRepository> => {
 | |
|   if (reset) {
 | |
|     UserCore.reset();
 | |
|   }
 | |
| 
 | |
|   return {
 | |
|     get: jest.fn(),
 | |
|     getAdmin: jest.fn(),
 | |
|     getByEmail: jest.fn(),
 | |
|     getByStorageLabel: jest.fn(),
 | |
|     getByOAuthId: jest.fn(),
 | |
|     getUserStats: jest.fn(),
 | |
|     getList: jest.fn(),
 | |
|     create: jest.fn(),
 | |
|     update: jest.fn(),
 | |
|     delete: jest.fn(),
 | |
|     getDeletedUsers: jest.fn(),
 | |
|     restore: jest.fn(),
 | |
|     hasAdmin: jest.fn(),
 | |
|   };
 | |
| };
 |