runtipi/packages/system-api/__mocks__/node-cron.ts
Nicolas Meienberger 9d4cdf6f77 test: cron jobs
2022-09-24 16:02:33 +02:00

11 lines
199 B
TypeScript

const cron: {
schedule: typeof schedule;
} = jest.genMockFromModule('node-cron');
const schedule = (scd: string, cb: () => void) => {
cb();
};
cron.schedule = schedule;
module.exports = cron;