1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +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:
Ruben Bridgewater
2015-09-14 15:07:32 +02:00
parent e24f056b2d
commit c522ca1264
13 changed files with 208 additions and 76 deletions

View File

@@ -70,6 +70,21 @@ describe("The 'get' method", function () {
done(err);
});
});
it("gets the value correctly with array syntax and the callback being in the array", function (done) {
client.GET([key, function (err, res) {
helper.isString(value)(err, res);
done(err);
}]);
});
it("should not throw on a get without callback (even if it's not useful", function (done) {
client.GET(key);
client.on('error', function(err) {
throw err;
});
setTimeout(done, 50);
});
});
describe("when the key does not exist in Redis", function () {