You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix inconsistent command argument handling
Earlier multi.command and client.command diverged a lot in the way they accepted arguments. This is now consistent This will also fix some bugs like using multi.hmset with arrays
This commit is contained in:
@@ -33,6 +33,16 @@ describe("The 'blpop' method", function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('pops value immediately if list contains values using array notation', function (done) {
|
||||
bclient = redis.createClient.apply(redis.createClient, args);
|
||||
client.rpush(["blocking list", "initial value"], helper.isNumber(1));
|
||||
bclient.blpop(["blocking list", 0], function (err, value) {
|
||||
assert.strictEqual(value[0], "blocking list");
|
||||
assert.strictEqual(value[1], "initial value");
|
||||
return done(err);
|
||||
});
|
||||
});
|
||||
|
||||
it('waits for value if list is not yet populated', function (done) {
|
||||
bclient = redis.createClient.apply(redis.createClient, args);
|
||||
bclient.blpop("blocking list 2", 5, function (err, value) {
|
||||
|
Reference in New Issue
Block a user