I'm using NestJS Queues via Bull and writing unit tests in Jest. I want to skip the processing of jobs triggered during testing.
There's a GH issue on test mode for Bull but they won't implement it.
Preferably I'd avoid extensive mocking, a simple option on BullModule
would be best.
Currently, my workaround is to delay test jobs by an arbitrary high timeframe. I can Initialize
BullModule
when building my test module as follows:I don't like this so much as the jobs will idle in Redis.