1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-04 10:56:47 +01:00
immich/server/test/repositories/system-config.repository.mock.ts
Jason Rasmussen 50c9bc0336
chore: migrate to vitest (#7156)
* chore: jest => vitest

* chore: replace jest-when
2024-04-16 10:44:45 -04:00

17 lines
534 B
TypeScript

import { SystemConfigCore } from 'src/cores/system-config.core';
import { ISystemConfigRepository } from 'src/interfaces/system-config.interface';
import { Mocked, vitest } from 'vitest';
export const newSystemConfigRepositoryMock = (reset = true): Mocked<ISystemConfigRepository> => {
if (reset) {
SystemConfigCore.reset();
}
return {
fetchStyle: vitest.fn(),
load: vitest.fn().mockResolvedValue([]),
readFile: vitest.fn(),
saveAll: vitest.fn().mockResolvedValue([]),
deleteKeys: vitest.fn(),
};
};