Skip to content

Commit

Permalink
test: don't stop/start job before using setTime
Browse files Browse the repository at this point in the history
setTime() already stops/starts the job
  • Loading branch information
sheerlox authored and intcreator committed Apr 22, 2023
1 parent 31989e0 commit f0d5d3f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/cron.test.js
Expand Up @@ -854,10 +854,8 @@ describe('cron', () => {
job.start();
clock.tick(1000);

job.stop();
const time = cron.time('*/2 * * * * *');
job.setTime(time);
job.start();

clock.tick(4000);

Expand Down Expand Up @@ -885,7 +883,6 @@ describe('cron', () => {

clock.tick(1000);

job.stop();
expect(() => {
job.setTime(time);
}).toThrow();
Expand Down

0 comments on commit f0d5d3f

Please sign in to comment.