unit-testing services that use bullMQ with redis #2091
-
Hi guys!, hope you are all doing well. i have found myself in a pinch. so far i have been running redis in a docker container for unit tests but i realise this not a unit-test everything in a unittest should happen in memory and i am unable to find a solution that helps me.
any help is greatly appriciated |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
We recommend to use a Redis instance in order to run the tests. |
Beta Was this translation helpful? Give feedback.
-
i did try doing that, have tried ioredis, redis-mock, redis-server none of these helped, |
Beta Was this translation helpful? Give feedback.
-
hi @RafiuJaman, we use an actual redis instance in our local or also we have a docker compose to instantiate one https://github.com/taskforcesh/bullmq/blob/master/docker-compose.yml |
Beta Was this translation helpful? Give feedback.
This would be specific for your unit tests, like you would mock any other external library.