Added
ZRANGEBYSCORE command (#350 @usebaz)
const data = {
foo: new Map([
['first', { score: 1, value: 'first' }],
['second', { score: 2, value: 'second' }],
['third', { score: 3, value: 'third' }],
['fourth', { score: 4, value: 'fourth' }],
['fifth', { score: 5, value: 'fifth' }],
]),
};
const RedisMock = require('ioredis-mock');
const redis = new RedisMock({ data });
redis
.zrangebyscore('foo', 1, 3)
.then(result => console.log(result)) // logs ['first', 'second', 'third']
QUIT stub (#350 @usebaz)
In ioredis
this is the equivalent to calling redis.disconnect
. ioredis-mock
does not implement connection simulation functionality yet so for now it's just a stub.
redis.quit() // OK
UNSUBSCRIBE stub (#350 @usebaz)
Our previous release added subscribe
and joining the fray you can now pretend to be unsubscribing (just like the newsletters in your inbox!)
redis.unsubscribe() // OK