You've already forked node-redis
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user