Skip to content

Commit

Permalink
improve q.workersList() test
Browse files Browse the repository at this point in the history
  • Loading branch information
hargasinski committed Jun 11, 2017
1 parent ccf3bf8 commit 15aff0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mocha_test/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,16 +759,19 @@ describe('queue', function(){
expect(
getWorkersListData(q)
).to.eql(itemsBeingProcessed[task]);
expect(q.workersList().length).to.equal(q.running());
async.setImmediate(function() {
expect(
getWorkersListData(q)
).to.eql(itemsBeingProcessed[task+'_cb']);
expect(q.workersList().length).to.equal(q.running());
cb();
});
}, 2);

q.drain = function() {
expect(q.workersList()).to.eql([]);
expect(q.workersList().length).to.equal(q.running());
done();
};

Expand Down

0 comments on commit 15aff0f

Please sign in to comment.