mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
84f7ca855a
move domain interfaces
25 lines
631 B
TypeScript
25 lines
631 B
TypeScript
import { UserCore } from 'src/cores/user.core';
|
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
|
|
|
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(),
|
|
hasAdmin: jest.fn(),
|
|
updateUsage: jest.fn(),
|
|
syncUsage: jest.fn(),
|
|
};
|
|
};
|