Queston: Is it possible to unit test named job proccess handler calls with jest? #2010
Unanswered
ealcantara22
asked this question in
Q&A
Replies: 3 comments
-
I am having the same issue as well. Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I also have the same issue. Has anyone managed to find a solution to this ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
As I see it you could just unit test the handler isolated from the process function, just make sure that you properly mock the "job" object that you pass to the handler. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hello, I would like to know if its possible to test named job processor calls after call the queue
add
method using jest. Also, an example of how to accomplish this would be great.Minimal, Working Test code to reproduce the issue.
Looking to accomplish something like:
The response always is:
Bull version
3.20.1
Additional information
I've already tried mocking the bull lib. Also, ioredis-mock following this thread and of course using fully working redis instance up and running.
Beta Was this translation helpful? Give feedback.
All reactions