ioredis-mock
ioredis-mock copied to clipboard
ioredis-mock `rpop` doesn't react the same as ioredis `rpop`
Issue
ioredis-mock rpop
command doesn't have the same behavior as in ioredis.
ioredis
rpop
has a count
parameter that allows to retrieve X messages in 1 command. See https://redis.io/commands/rpop
rpop
will always return an array.
ioredis-mock
rpop
has no count
parameter.
rpop
always return only 1 item, which is not the expected array.
Expected behavior
ioredis-mock rpop
command should react the same as in ioredis.
This probably applies to lpop
too.
Hey thanks for the report 😄
I don't have time to work on this anytime soon but PRs are welcome and I'll be sure to review and release ❤
Yes @JonnyIngeno , it also applies to lpop. Even if count is supplied, string
type is returned. In ioredis, if count is supplied string[]
type is returned