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(),
|
|
|
|
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()),
|
2023-04-01 22:46:07 +02:00
|
|
|
getQueueStatus: jest.fn(),
|
2023-01-22 06:13:36 +02:00
|
|
|
getJobCounts: jest.fn(),
|
2023-01-21 18:11:55 +02:00
|
|
|
};
|
|
|
|
};
|