1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Subscribe commands take optional callback. Fixes [GH-140].

This commit is contained in:
Matt Ranney
2011-11-13 21:01:15 -10:00
parent 6a44331acd
commit 6232d35993
2 changed files with 29 additions and 11 deletions

View File

@@ -469,7 +469,12 @@ tests.SUBSCRIBE = function () {
});
client1.set("did a thing", 1, require_string("OK", name));
client1.subscribe("chan1", "chan2");
client1.subscribe("chan1", "chan2", function (err, results) {
assert.strictEqual(null, err, "result sent back unexpected error: " + err);
assert.strictEqual(2, results.length, name);
assert.strictEqual("chan1", results[0].toString(), name);
assert.strictEqual(1, results[1], name);
});
};
tests.SUBSCRIBE_QUIT = function () {