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