1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Improve code coverage by adding tests and removing unnecessary code

This commit is contained in:
Ruben Bridgewater
2015-09-03 21:54:57 +02:00
parent b1e51c8c7b
commit 89e1f6f067
10 changed files with 166 additions and 95 deletions

View File

@@ -37,6 +37,14 @@ describe("The 'hmget' method", function () {
});
});
it('allows keys to be specified by passing an array as first argument', function (done) {
client.HMGET([hash, "0123456789", "some manner of key"], function (err, reply) {
assert.strictEqual("abcdefghij", reply[0].toString());
assert.strictEqual("a type of value", reply[1].toString());
return done(err);
});
});
it('allows a single key to be specified in an array', function (done) {
client.HMGET(hash, ["0123456789"], function (err, reply) {
assert.strictEqual("abcdefghij", reply[0].toString());