ioredis-mock
ioredis-mock copied to clipboard
replyTransformer is not executed when `hgetAllBuffer()` is used.
Register a reply-transformer:
IORedis.Command.setReplyTransformer("hgetall", function(result) {
console.log("RUNNING TRANSFORMER:");
return [42];
});
IORedis will call this when either hgetall()
or hgetallBuffer()
is called. ioredis-mock only does it for hgetall()
.
You can work around this with ioredis-mock by calling setReplyTransformer()
again with "hgetallBuffer"
as the string argument, but this should be unnecessary.
I have not checked, but it seems likely ioredis-mock has a similar problem for all the *Buffer()
ioredis functions.