2024-03-21 06:59:49 -05:00
|
|
|
import { IJobRepository } from 'src/interfaces/job.interface';
|
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()),
|
2024-01-01 15:45:42 -05:00
|
|
|
queueAll: 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-12-04 21:07:20 -05:00
|
|
|
clear: jest.fn(),
|
2024-01-18 00:08:48 -05:00
|
|
|
waitForQueueCompletion: jest.fn(),
|
2023-01-21 11:11:55 -05:00
|
|
|
};
|
|
|
|
};
|