mirror of
https://github.com/immich-app/immich.git
synced 2024-12-23 02:06:15 +02:00
0243570c0b
* make system config core singleton * refactor * fix tests * chore: fix tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
15 lines
387 B
TypeScript
15 lines
387 B
TypeScript
import { ISystemConfigRepository, SystemConfigCore } from '@app/domain';
|
|
|
|
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
|
if (reset) {
|
|
SystemConfigCore.reset();
|
|
}
|
|
|
|
return {
|
|
load: jest.fn().mockResolvedValue([]),
|
|
readFile: jest.fn(),
|
|
saveAll: jest.fn().mockResolvedValue([]),
|
|
deleteKeys: jest.fn(),
|
|
};
|
|
};
|