Skip to content

Commit

Permalink
adding getDelayed to ZembleQueueMock
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryiguchi committed Jan 7, 2025
1 parent 0b86cfa commit 4e01909
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-owls-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zemble/bull": patch
---

added getDelayed to ZembleQueueMock
4 changes: 2 additions & 2 deletions packages/bull/ZembleQueueMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ class ZembleQueueMock<DataType = unknown, ResultType extends PromiseLike<unknown
this.isPaused = false
}

// eslint-disable-next-line class-methods-use-this
async getDelayed() {
const jobs = await Promise.all(this.jobs.filter(async (job) => job.isDelayed()))
return jobs as unknown as ReturnType<ZembleQueueBull<DataType, ResultType>['getDelayed']>
return []
}

#waitUntilFinishedPromise: Promise<void> | undefined
Expand Down

0 comments on commit 4e01909

Please sign in to comment.