Skip to content

Commit

Permalink
Fix flakey tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebamarynissen committed Jan 31, 2024
1 parent 24e5d89 commit a3cf79e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/job.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('Job', () => {
const job2 = new Job(agenda, { name: 'demo', type: 'normal' });
const now = new Date().valueOf();
job2.repeatEvery('3 minutes', { skipImmediate: true });
expect(job2.attrs.nextRunAt).to.be.within(new Date(now + 180000), new Date(now + 180002)); // Inclusive
expect(job2.attrs.nextRunAt).to.be.within(new Date(now + 180000 - 2), new Date(now + 180002)); // Inclusive
});
it('repeats from the existing nextRunAt property with skipImmediate', () => {
const job2 = new Job(agenda, { name: 'demo', type: 'normal' });
Expand Down

0 comments on commit a3cf79e

Please sign in to comment.