2024-03-21 12:59:49 +01:00
|
|
|
import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface';
|
2024-09-30 23:31:21 +02:00
|
|
|
import { clearConfigCache } from 'src/utils/config';
|
2024-04-16 16:44:45 +02:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2024-01-04 06:28:32 +01:00
|
|
|
|
2024-09-30 23:31:21 +02:00
|
|
|
export const newSystemMetadataRepositoryMock = (): Mocked<ISystemMetadataRepository> => {
|
|
|
|
clearConfigCache();
|
2024-01-04 06:28:32 +01:00
|
|
|
return {
|
2024-04-16 16:44:45 +02:00
|
|
|
get: vitest.fn() as any,
|
|
|
|
set: vitest.fn(),
|
2024-07-01 19:43:16 +02:00
|
|
|
delete: vitest.fn(),
|
2024-05-16 00:58:23 +02:00
|
|
|
readFile: vitest.fn(),
|
2024-01-04 06:28:32 +01:00
|
|
|
};
|
|
|
|
};
|