Skip to content

Commit

Permalink
test: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed May 21, 2024
1 parent 0c9b99d commit 82c3cf0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/test_job.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,9 @@ describe('Job', () => {
.then(isFailed => {
expect(isFailed).to.be(false);
})
.then(() => {
return scripts.moveToActive(queue);
})
.then(() => {
return job.moveToFailed(new Error('test error'), true);
})
Expand All @@ -734,11 +737,9 @@ describe('Job', () => {
expect(isFailed).to.be(false);
expect(job.stacktrace).not.be(null);
expect(job.stacktrace.length).to.be(1);
return client.lpush(queue.toKey('active'), job.id).then(()=>{
return job.isDelayed().then(isDelayed => {
expect(isDelayed).to.be(true);
});
})
return job.isDelayed().then(isDelayed => {
expect(isDelayed).to.be(true);
});
});
});
});
Expand Down

0 comments on commit 82c3cf0

Please sign in to comment.