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