mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): make user core singleton (#4607)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { IUserRepository } from '@app/domain';
|
||||
import { IUserRepository, UserCore } from '@app/domain';
|
||||
|
||||
export const newUserRepositoryMock = (reset = true): jest.Mocked<IUserRepository> => {
|
||||
if (reset) {
|
||||
UserCore.reset();
|
||||
}
|
||||
|
||||
export const newUserRepositoryMock = (): jest.Mocked<IUserRepository> => {
|
||||
return {
|
||||
get: jest.fn(),
|
||||
getAdmin: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user