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