2024-03-21 12:59:49 +01:00
|
|
|
import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface';
|
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
|
|
|
|
2024-09-30 17:31:21 -04:00
|
|
|
export const newSystemMetadataRepositoryMock = (): Mocked<ISystemMetadataRepository> => {
|
|
|
|
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
|
|
|
};
|
|
|
|
};
|