Skip to content

Commit

Permalink
Fix setCronJob tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tumao727 committed Nov 18, 2021
1 parent 88be0b6 commit 5edc66b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions express/src/__tests__/crons/crons.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ describe('test crons service', () => {
});

test('test SchedulerRegistry related methods', async () => {
const logSpy = jest.spyOn(console, 'log');
schedulerRegistry.setCronJob(mockName, mockCronFrequency, () => mockCb());
expect(logSpy).toBeCalledWith(`${mockName}: running a task every seconds`);
expect(mockCb).toBeCalledTimes(1);
expect(schedule).toBeCalledWith(mockCronFrequency, expect.any(Function));

Expand Down

0 comments on commit 5edc66b

Please sign in to comment.