You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fixed .multi() to convert HGETALL result to an object
This commit is contained in:
15
test.js
15
test.js
@@ -183,6 +183,21 @@ tests.MULTI_5 = function () {
|
||||
});
|
||||
};
|
||||
|
||||
tests.MULTI_6 = function () {
|
||||
var name = "MULTI_6";
|
||||
|
||||
client.multi()
|
||||
.hmset("multihash", "a", "foo", "b", 1)
|
||||
.hgetall("multihash")
|
||||
.exec(function (err, replies){
|
||||
assert.strictEqual(null, err);
|
||||
assert.equal("OK", replies[0]);
|
||||
assert.equal(Object.keys(replies[1]).length, 2);
|
||||
assert.equal("foo", replies[1].a.toString());
|
||||
assert.equal("1", replies[1].b.toString());
|
||||
next(name);
|
||||
});
|
||||
};
|
||||
|
||||
tests.HMGET = function () {
|
||||
var key = "test hash", name = "HMGET";
|
||||
|
Reference in New Issue
Block a user