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

Increase the coverage

This commit is contained in:
Ruben Bridgewater
2015-09-13 02:21:21 +02:00
parent 8fa5b93c93
commit 06121a65c4
3 changed files with 4 additions and 0 deletions

View File

@@ -23,7 +23,9 @@ describe("The 'blpop' method", function () {
it('pops value immediately if list contains values', function (done) { it('pops value immediately if list contains values', function (done) {
bclient = redis.createClient.apply(redis.createClient, args); bclient = redis.createClient.apply(redis.createClient, args);
redis.debug_mode = true;
client.rpush("blocking list", "initial value", helper.isNumber(1)); client.rpush("blocking list", "initial value", helper.isNumber(1));
redis.debug_mode = false;
bclient.blpop("blocking list", 0, function (err, value) { bclient.blpop("blocking list", 0, function (err, value) {
assert.strictEqual(value[0], "blocking list"); assert.strictEqual(value[0], "blocking list");
assert.strictEqual(value[1], "initial value"); assert.strictEqual(value[1], "initial value");

View File

@@ -64,6 +64,7 @@ describe("The 'get' method", function () {
}); });
it("gets the value correctly", function (done) { it("gets the value correctly", function (done) {
client.GET(key, redis.print); // Use the utility function to print the result
client.GET(key, function (err, res) { client.GET(key, function (err, res) {
helper.isString(value)(err, res); helper.isString(value)(err, res);
done(err); done(err);

View File

@@ -34,6 +34,7 @@ describe("The 'getset' method", function () {
}); });
it("reports an error", function (done) { it("reports an error", function (done) {
client.GET(key, redis.print); // Use the utility function to print the error
client.get(key, function (err, res) { client.get(key, function (err, res) {
assert.equal(err.message, 'Redis connection gone from end event.'); assert.equal(err.message, 'Redis connection gone from end event.');
done(); done();