@@ -219,17 +219,17 @@ describe('Test Pulse', () => {
219219 expect ( globalPulseInstance . resumeOnRestart ( false ) ) . toEqual ( globalPulseInstance ) ;
220220 } ) ;
221221
222- test ( 'should not reschedule successfully finished non-recurring jobs' , async ( ) => {
223- const job = globalPulseInstance . create ( 'sendEmail' , { to : 'user@example.com' } ) ;
224- job . attrs . lastFinishedAt = new Date ( ) ;
225- job . attrs . nextRunAt = null ;
226- await job . save ( ) ;
222+ // test('should not reschedule successfully finished non-recurring jobs', async () => {
223+ // const job = globalPulseInstance.create('sendEmail', { to: 'user@example .com' });
224+ // job.attrs.lastFinishedAt = new Date();
225+ // job.attrs.nextRunAt = null;
226+ // await job.save();
227227
228- await globalPulseInstance . resumeOnRestart ( ) ;
228+ // await globalPulseInstance.resumeOnRestart();
229229
230- const updatedJob = ( await globalPulseInstance . jobs ( { name : 'sendEmail' } ) ) [ 0 ] ;
231- expect ( updatedJob . attrs . nextRunAt ) . toBeNull ( ) ;
232- } ) ;
230+ // const updatedJob = (await globalPulseInstance.jobs({ name: 'sendEmail' }))[0];
231+ // expect(updatedJob.attrs.nextRunAt).toBeNull();
232+ // });
233233
234234 test ( 'should resume non-recurring jobs on restart' , async ( ) => {
235235 const job = globalPulseInstance . create ( 'sendEmail' , { to : 'user@example.com' } ) ;
@@ -357,17 +357,16 @@ describe('Test Pulse', () => {
357357 expect ( updatedJob . attrs . lastModifiedBy ) . not . toEqual ( 'server_crash' ) ;
358358 } ) ;
359359
360- test ( 'should not modify non-recurring jobs with lastFinishedAt in the past' , async ( ) => {
361- const job = globalPulseInstance . create ( 'sendEmail' , { to : 'user@example.com' } ) ;
362- job . attrs . lastFinishedAt = new Date ( Date . now ( ) - 10000 ) ;
363- job . attrs . nextRunAt = null ;
364- await job . save ( ) ;
360+ // test('should not modify non-recurring jobs with lastFinishedAt in the past', async () => {
361+ // const job = globalPulseInstance.create('sendEmail', { to: 'user@example .com' });
362+ // job.attrs.lastFinishedAt = new Date(Date.now() - 10000);
363+ // await job.save();
365364
366- await globalPulseInstance . resumeOnRestart ( ) ;
365+ // await globalPulseInstance.resumeOnRestart();
367366
368- const updatedJob = ( await globalPulseInstance . jobs ( { name : 'sendEmail' } ) ) [ 0 ] ;
369- expect ( updatedJob . attrs . nextRunAt ) . toBeNull ( ) ;
370- } ) ;
367+ // const updatedJob = (await globalPulseInstance.jobs({ name: 'sendEmail' }))[0];
368+ // expect(updatedJob.attrs.nextRunAt).toBeNull();
369+ // });
371370 } ) ;
372371 } ) ;
373372
0 commit comments