Skip to content

Commit

Permalink
test: fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Aug 17, 2019
1 parent 85302c4 commit 9b78d4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/test_job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { v4 } from 'node-uuid';
import { JobsOpts } from '@src/interfaces';
import { QueueEvents } from '@src/classes/queue-events';
import { Worker } from '@src/classes/worker';
import { after } from 'lodash';

import { delay } from 'bluebird';

Expand Down Expand Up @@ -270,7 +271,7 @@ describe('Job', function() {
});

const processStarted = new Promise(resolve =>
worker.once('active', resolve),
worker.on('active', after(2, resolve)),
);

const add = (jobId: string, ms = 0) =>
Expand All @@ -279,7 +280,8 @@ describe('Job', function() {
await add('1');
await add('2', 1);
await processStarted;
const job = await add('3', 5000);
const job = await add('3', 2000);

await job.promote();
await add('4', 1);

Expand Down

0 comments on commit 9b78d4b

Please sign in to comment.