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

Support sadd with 2 params #141

Open posabsolute opened this issue 3 years ago • 1 comments

https://github.com/yeahoffline/redis-mock/issues/185

Fix sadd when being called with a single member. Example code:

mockRedis = require("redis-mock").createClient();
mockRedis.sadd("setName", "member");

Since only two arguments are passed, the check on line 11 resolves to true, so the method immediately exits without adding the member to the set.

posabsolute avatar Jun 02 '21 13:06 posabsolute

Is there anything holding up this pull request?

Also, it probably makes sense to update the comment on the method (line 8) to say "We require at least 2 arguments"

EvanPlettGML avatar Jul 21 '21 14:07 EvanPlettGML