1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 20:36:48 +01:00
immich/server/test/repositories/system-config.repository.mock.ts

17 lines
513 B
TypeScript
Raw Normal View History

import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
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(),
};
};