redis-mock
redis-mock copied to clipboard
Implement sorted set commands
Redis-mock does not implement the followings :
"zadd",
"zcard",
"zcount",
"zincrby",
"zinterstore",
"zrange",
"zrangebyscore",
"zrank",
"zrem",
"zremrangebyrank",
"zremrangebyscore",
"zrevrange",
"zrevrangebyscore",
"zrevrank",
"zscore",
"zunionstore"
Ref : https://github.com/mranney/node_redis/blob/master/lib/commands.js
This would be cool :)
I am working on Sorted Sets support. Anyone has work done on this?
In which file does ZADD
should go?
https://github.com/faeldt/redis-mock/tree/master/lib
Maybe a new file zfunctions.js
?
@jamc I was working on z*
functions. I have zcard
, zadd
, zrem
All of them were implemented at lib/sorted-set.js
file.
Have a look at my sorted-set branch.
Then I started implementing the multi
features and I think that I gave up. I'm not sure that re-implementing the logics behind redis in node.js is the right way to go.
Any updates about this feature?
@GuillaumeCisco I gave up on this. As I said before it doesn't make sense (to me) implementing redis' logics in node when you have no way to validate that you're reaching the same behaviour.
What I am doing on unit tests which require Redis is a stub on redis client methods to return mocks. As expected unit test shouldn't keep state, so it works like a charm.
Let me know if I can help you further.