Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioredis-mock rpop doesn't react the same as ioredis rpop #1144

Open
JonnyIngeno opened this issue Jan 31, 2022 · 2 comments
Open

ioredis-mock rpop doesn't react the same as ioredis rpop #1144

JonnyIngeno opened this issue Jan 31, 2022 · 2 comments

Comments

@JonnyIngeno
Copy link

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.

@stipsan
Copy link
Owner

stipsan commented Feb 1, 2022

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 ❤

@eminberkayd
Copy link

eminberkayd commented May 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants