2023-06-08 10:01:07 -05:00
|
|
|
import { IJobRepository } from '@app/domain';
|
2023-01-21 11:11:55 -05:00
|
|
|
|
|
|
|
export const newJobRepositoryMock = (): jest.Mocked<IJobRepository> => {
|
|
|
|
return {
|
2023-06-01 05:32:51 -05:00
|
|
|
addHandler: jest.fn(),
|
2023-10-31 15:19:12 -05:00
|
|
|
addCronJob: jest.fn(),
|
|
|
|
deleteCronJob: jest.fn(),
|
|
|
|
updateCronJob: jest.fn(),
|
2023-06-01 05:32:51 -05:00
|
|
|
setConcurrency: jest.fn(),
|
2023-01-21 23:13:36 -05:00
|
|
|
empty: jest.fn(),
|
2023-03-20 10:55:28 -05:00
|
|
|
pause: jest.fn(),
|
2023-03-28 13:25:22 -05:00
|
|
|
resume: jest.fn(),
|
2023-02-25 09:12:03 -05:00
|
|
|
queue: jest.fn().mockImplementation(() => Promise.resolve()),
|
2023-04-01 15:46:07 -05:00
|
|
|
getQueueStatus: jest.fn(),
|
2023-01-21 23:13:36 -05:00
|
|
|
getJobCounts: jest.fn(),
|
2023-01-21 11:11:55 -05:00
|
|
|
};
|
|
|
|
};
|