Investigate if ioredis can be used as client
Would it be possible to remove the client restriction here and either:
- Allow everything, thereby putting responsibility on the library user (This would allow mock objects)
- Add specific support for ioredis
I'm leaning towards 1 and then explicit stating in the documentation that redis is officially supported but other libraries can (possibly) be used to.
I'm for 1. too, but we could at least check if the methods we need are in the passed client object and if they return promises.
#1 would work for me as well.
@stefanosala @jeffmcaffer I've now tested the current suite with ioredis and there are 8 failing tests. It's possible it's something minor, but at least it's not just a matter of removing the client restriction without any further changes. I will leave this open for now, but I don't think I will have time in the near-future to deep dive into this and make it work for both clients.
However, I will still remove the client restriction so a mock object can be passed and leave responsibilty to the developer :-) This change is coming up soon.