ioredis-mock icon indicating copy to clipboard operation
ioredis-mock copied to clipboard

ioredis-mock `rpop` doesn't react the same as ioredis `rpop`

Open JonnyIngeno opened this issue 3 years ago • 2 comments

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.

JonnyIngeno avatar Jan 31 '22 17:01 JonnyIngeno

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 ❤

stipsan avatar Feb 01 '22 22:02 stipsan

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

eminberkayd avatar May 30 '23 11:05 eminberkayd