2024-03-20 15:20:38 -05:00
|
|
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
2024-03-21 06:59:49 -05:00
|
|
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.interface';
|
2023-10-08 19:51:03 -05:00
|
|
|
|
|
|
|
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
|
|
|
if (reset) {
|
|
|
|
SystemConfigCore.reset();
|
|
|
|
}
|
2023-01-21 11:11:55 -05:00
|
|
|
|
|
|
|
return {
|
2023-11-09 11:10:56 -05:00
|
|
|
fetchStyle: jest.fn(),
|
2023-01-21 11:11:55 -05:00
|
|
|
load: jest.fn().mockResolvedValue([]),
|
2023-08-25 12:44:52 -05:00
|
|
|
readFile: jest.fn(),
|
2023-01-21 11:11:55 -05:00
|
|
|
saveAll: jest.fn().mockResolvedValue([]),
|
|
|
|
deleteKeys: jest.fn(),
|
|
|
|
};
|
|
|
|
};
|