1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00
immich/server/test/repositories/system-metadata.repository.mock.ts
2024-05-15 18:58:23 -04:00

16 lines
471 B
TypeScript

import { SystemConfigCore } from 'src/cores/system-config.core';
import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface';
import { Mocked, vitest } from 'vitest';
export const newSystemMetadataRepositoryMock = (reset = true): Mocked<ISystemMetadataRepository> => {
if (reset) {
SystemConfigCore.reset();
}
return {
get: vitest.fn() as any,
set: vitest.fn(),
readFile: vitest.fn(),
fetchStyle: vitest.fn(),
};
};