Open EvanPlettGML opened 3 years ago
This line: https://github.com/yeahoffline/redis-mock/blob/84fed02fbbc76d4b3f6d1fcdda6516aa9ae2732b/lib/server/set.js#L11
prevents sad from 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.
Suggestion: change line 11 to if (arguments.length < 2) {
if (arguments.length < 2) {
This line: https://github.com/yeahoffline/redis-mock/blob/84fed02fbbc76d4b3f6d1fcdda6516aa9ae2732b/lib/server/set.js#L11
prevents sad from being called with a single member. Example code:
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.