From db4f1648d48b7b3535fe0afce163d3cefd1888e1 Mon Sep 17 00:00:00 2001 From: Trae Robrock Date: Thu, 28 Jun 2012 21:36:00 -0700 Subject: [PATCH] Adding tests for idle event Signed-off-by: DTrejo --- test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test.js b/test.js index 037512669f..0fa15e9a79 100644 --- a/test.js +++ b/test.js @@ -470,6 +470,17 @@ tests.reconnect = function () { }); }; +tests.idle = function () { + var name = "idle"; + + client.on("idle", function on_idle() { + client.removeListener("idle", on_idle); + next(name); + }); + + client.set("idle", "test"); +}; + tests.HSET = function () { var key = "test hash", field1 = new Buffer("0123456789"),