faeldt / redis-mock

Node.js redis client mock
112 stars 157 forks source link

Possible to force the client to return errors? #35

Open ghost opened 9 years ago

ghost commented 9 years ago

Thanks for a great library; it has been very helpful to us in testing.

I'm working my way through checking all of our tests and code coverage, and one case I have that isn't covered is verifying that my software fails gracefully if any redis callback returns an error. Is there a way to force RedisMock to do this?

Personally, I expected to be able to call client.end() midway through a test and see all client commands after that fail; however, having some other method to do the job would work acceptably!

Schavras commented 6 years ago

Hello! Im also working on errors at the moment, and more specific about reconnecting hadling. So i would like to mock a disconnect-reconnect event from redis. Do we have any progress on that?

If not, I could try, but not sure I will manage it