You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a NestJS app which is using @nestjs/bullmq. I am trying to write some e2e test for my app using the @nestjs/testing. But I get the an error, saying that I do not have a worker. I have a Redis container running in the background1.
And I also learned that the issue lies in how @Processor decorator is working since if I mock it away it just works. But that's not always the desired scenario, right?
Thank you for taking the time to submit your report! From the looks of it, this could be better discussed on our Discord. If you haven't already, please join here and send a new post in the # 🐈 nestjs-help forum. Make sure to include a link to this issue, so you don't need to write it all again. We have a large community of helpful members, who will assist you in getting this to work.
Is there an existing issue for this?
Current behavior
I have a NestJS app which is using
@nestjs/bullmq
. I am trying to write some e2e test for my app using the@nestjs/testing
. But I get the an error, saying that I do not have a worker. I have a Redis container running in the background1.Minimum reproduction code
https://github.com/kasir-barati/bugs/tree/bullmq-worker-needs-connection
Steps to reproduce
Written in the
README.md
.Expected behavior
Just queue the message as you should be doing it.
Package version
11.0.1
Bull version
5.35.1
NestJS version
11.0.1
Node.js version
22.12.0
In which operating systems have you tested?
Other
I had already asked around and since I was not able to get a straight answer I opened this issue:
Mocking BullMQ Module for E2E Testing.
Add support for mocking Redis when in development mode.
And I also learned that the issue lies in how
@Processor
decorator is working since if I mock it away it just works. But that's not always the desired scenario, right?As I shared it here.
I do not know exactly what is missing in my code right now 😕.
Footnotes
I am using Testcontainers and I had written a test case to show that I have a redis container running in the background. ↩
The text was updated successfully, but these errors were encountered: