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

Add jshint and fix errors accordingly (including broken tests)

This commit is contained in:
Ruben Bridgewater
2015-09-01 21:37:24 +02:00
parent f7ac0e5e32
commit 06c5f1922b
69 changed files with 290 additions and 182 deletions

View File

@@ -1,3 +1,5 @@
'use strict';
var assert = require("assert");
var config = require("../lib/config");
var helper = require("../helper");
@@ -33,7 +35,7 @@ describe("The 'watch' method", function () {
it('does not execute transaction if watched key was modified prior to execution', function (done) {
client.watch(watched);
client.incr(watched);
multi = client.multi();
var multi = client.multi();
multi.incr(watched);
multi.exec(helper.isNull(done));
})
@@ -45,17 +47,15 @@ describe("The 'watch' method", function () {
client.watch(watched);
client.incr(watched);
var multi = client.multi()
.incr(watched)
.exec(function (err, replies) {
assert.strictEqual(replies, null, "Aborted transaction multi-bulk reply should be null.");
client.multi().incr(watched).exec(function (err, replies) {
assert.strictEqual(replies, null, "Aborted transaction multi-bulk reply should be null.");
client.get("unwatched", function (err, reply) {
assert.equal(reply, 200, "Expected 200, got " + reply);
return done(err)
});
});
})
client.get("unwatched", function (err, reply) {
assert.equal(reply, 200, "Expected 200, got " + reply);
return done(err);
});
});
});
});
});
});