mirror of
https://github.com/immich-app/immich.git
synced 2024-12-23 02:06:15 +02:00
cd375a976e
* add automatic library scan config options * add validation * open api * use CronJob instead of cron-validator * fix tests * catch potential error of the library scan initialization * better description for input field * move library scan job initialization to server app service * fix tests * add comments to all parameters of cronjob contructor * make scan a child of a more general library object * open api * chore: cleanup * move cronjob handling to job repoistory * web: select for common cron expressions * fix open api * fix tests * put scanning settings in nested accordion * fix system config validation * refactor, tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
18 lines
477 B
TypeScript
18 lines
477 B
TypeScript
import { IJobRepository } from '@app/domain';
|
|
|
|
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()),
|
|
getQueueStatus: jest.fn(),
|
|
getJobCounts: jest.fn(),
|
|
};
|
|
};
|