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

Merge pull request #136 from bobrik/callback-fixes

added ability to pass undefined instead of callback
This commit is contained in:
Matt Ranney
2011-11-14 22:15:36 -08:00
2 changed files with 20 additions and 4 deletions

14
test.js
View File

@@ -1210,6 +1210,20 @@ tests.TTL = function () {
}, 500);
};
tests.OPTIONAL_CALLBACK = function() {
var name = "OPTIONAL_CALLBACK";
client.del("op_cb1");
client.set("op_cb1", "x");
client.get("op_cb1", last(name, require_string("x", name)));
};
tests.OPTIONAL_CALLBACK_UNDEFINED = function() {
var name = "OPTIONAL_CALLBACK_UNDEFINED";
client.del("op_cb2");
client.set("op_cb2", "y", undefined);
client.get("op_cb2", last(name, require_string("y", name)));
}
all_tests = Object.keys(tests);
all_start = new Date();
test_count = 0;