2024-03-20 19:32:04 +01:00
|
|
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
|
|
|
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
2023-10-09 02:51:03 +02:00
|
|
|
|
|
|
|
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
|
|
|
if (reset) {
|
|
|
|
SystemConfigCore.reset();
|
|
|
|
}
|
2023-01-21 17:11:55 +01:00
|
|
|
|
|
|
|
return {
|
2023-11-09 17:10:56 +01:00
|
|
|
fetchStyle: jest.fn(),
|
2023-01-21 17:11:55 +01:00
|
|
|
load: jest.fn().mockResolvedValue([]),
|
2023-08-25 19:44:52 +02:00
|
|
|
readFile: jest.fn(),
|
2023-01-21 17:11:55 +01:00
|
|
|
saveAll: jest.fn().mockResolvedValue([]),
|
|
|
|
deleteKeys: jest.fn(),
|
|
|
|
};
|
|
|
|
};
|