basalt / testing/src / FakeQueue
Interface: FakeQueue
Defined in: testing/src/queue.ts:60
Properties
dispatched
> dispatched: CapturedJob[]
Defined in: testing/src/queue.ts:64
Every dispatch, in order — payload and context snapshot included.
plugin
> plugin: BasaltPlugin<unknown>
Defined in: testing/src/queue.ts:62
Register this in createTestApp({ plugins: [queue.plugin, ...] }).
Methods
assertDispatched()
> assertDispatched(job, predicate?): CapturedJob
Defined in: testing/src/queue.ts:65
Parameters
job
string | JobDefinition<any>
predicate?
(captured) => boolean
Returns
assertNothingDispatched()
> assertNothingDispatched(): void
Defined in: testing/src/queue.ts:70
Returns
void
drain()
> drain(): Promise<number>
Defined in: testing/src/queue.ts:72
Executes the captured backlog through the real handlers.
Returns
Promise<number>