mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
84f7ca855a
move domain interfaces
20 lines
625 B
TypeScript
20 lines
625 B
TypeScript
import { IJobRepository } from 'src/interfaces/job.repository';
|
|
|
|
export const newJobRepositoryMock = (): jest.Mocked<IJobRepository> => {
|
|
return {
|
|
addHandler: jest.fn(),
|
|
addCronJob: jest.fn(),
|
|
deleteCronJob: jest.fn(),
|
|
updateCronJob: jest.fn(),
|
|
setConcurrency: jest.fn(),
|
|
empty: jest.fn(),
|
|
pause: jest.fn(),
|
|
resume: jest.fn(),
|
|
queue: jest.fn().mockImplementation(() => Promise.resolve()),
|
|
queueAll: jest.fn().mockImplementation(() => Promise.resolve()),
|
|
getQueueStatus: jest.fn(),
|
|
getJobCounts: jest.fn(),
|
|
clear: jest.fn(),
|
|
waitForQueueCompletion: jest.fn(),
|
|
};
|
|
};
|