2025-02-17 14:50:13 +01:00
|
|
|
import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository';
|
|
|
|
import { RepositoryInterface } from 'src/types';
|
2024-09-30 17:31:21 -04:00
|
|
|
import { clearConfigCache } from 'src/utils/config';
|
2024-04-16 10:44:45 -04:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2024-01-03 23:28:32 -06:00
|
|
|
|
2025-02-17 14:50:13 +01:00
|
|
|
export const newSystemMetadataRepositoryMock = (): Mocked<RepositoryInterface<SystemMetadataRepository>> => {
|
2024-09-30 17:31:21 -04:00
|
|
|
clearConfigCache();
|
2024-01-03 23:28:32 -06:00
|
|
|
return {
|
2024-04-16 10:44:45 -04:00
|
|
|
get: vitest.fn() as any,
|
|
|
|
set: vitest.fn(),
|
2024-07-01 18:43:16 +01:00
|
|
|
delete: vitest.fn(),
|
2024-05-15 18:58:23 -04:00
|
|
|
readFile: vitest.fn(),
|
2024-01-03 23:28:32 -06:00
|
|
|
};
|
|
|
|
};
|