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