1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-31 11:32:55 +02:00
immich/server/test/repositories/system-config.repository.mock.ts

16 lines
414 B
TypeScript
Raw Normal View History

import { ISystemConfigRepository, SystemConfigCore } from '@app/domain';
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
if (reset) {
SystemConfigCore.reset();
}
return {
fetchStyle: jest.fn(),
load: jest.fn().mockResolvedValue([]),
readFile: jest.fn(),
saveAll: jest.fn().mockResolvedValue([]),
deleteKeys: jest.fn(),
};
};