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