You've already forked node-redis
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:
@@ -74,6 +74,26 @@ describe("The 'getset' method", function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("gets the value correctly with array syntax", function (done) {
|
||||
client.GETSET([key, value2], function (err, res) {
|
||||
helper.isString(value)(err, res);
|
||||
client.get(key, function (err, res) {
|
||||
helper.isString(value2)(err, res);
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("gets the value correctly with array syntax style 2", function (done) {
|
||||
client.GETSET(key, [value2], function (err, res) {
|
||||
helper.isString(value)(err, res);
|
||||
client.get(key, function (err, res) {
|
||||
helper.isString(value2)(err, res);
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("when the key does not exist in Redis", function () {
|
||||
|
Reference in New Issue
Block a user