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

Add simicolons and remove trailing whitespace

This commit is contained in:
Ruben Bridgewater
2015-09-01 21:39:44 +02:00
parent 06c5f1922b
commit 9acbd6c860
17 changed files with 55 additions and 61 deletions

View File

@@ -19,11 +19,10 @@ describe("The 'client' method", function () {
client.once("connect", function () {
client.flushdb(function (err) {
if (!helper.serverVersionAtLeast(client, [2, 4, 0])) {
err = Error('script not supported in redis <= 2.4.0')
err = Error('script not supported in redis <= 2.4.0');
}
return done(err);
})
});
});
});
@@ -39,15 +38,15 @@ describe("The 'client' method", function () {
it("lists connected clients when invoked with multi's chaining syntax", function (done) {
client.multi().client("list").exec(function(err, results) {
assert(pattern.test(results[0]), "expected string '" + results + "' to match " + pattern.toString());
return done()
})
return done();
});
});
it("lists connected clients when invoked with multi's array syntax", function (done) {
client.multi().client("list").exec(function(err, results) {
assert(pattern.test(results[0]), "expected string '" + results + "' to match " + pattern.toString());
return done()
})
return done();
});
});
});
});

View File

@@ -19,10 +19,10 @@ describe("The 'eval' method", function () {
client.once("connect", function () {
client.flushdb(function (err) {
if (!helper.serverVersionAtLeast(client, [2, 5, 0])) {
err = Error('exec not supported in redis <= 2.5.0')
err = Error('exec not supported in redis <= 2.5.0');
}
return done(err);
})
});
});
});

View File

@@ -27,7 +27,7 @@ describe("The 'hmset' method", function () {
assert.equal(obj['0123456789'], 'abcdefghij');
assert.equal(obj['some manner of key'], 'a type of value');
return done(err);
})
});
});
it('handles object-style syntax', function (done) {
@@ -36,7 +36,7 @@ describe("The 'hmset' method", function () {
assert.equal(obj['0123456789'], 'abcdefghij');
assert.equal(obj['some manner of key'], 'a type of value');
return done(err);
})
});
});
it('handles object-style syntax and the key being a number', function (done) {

View File

@@ -47,11 +47,11 @@ describe("The 'hset' method", function () {
});
it('does not error when a buffer and array are set as fields on the same hash', function (done) {
var hash = "test hash"
var field1 = "buffer"
var value1 = new Buffer("abcdefghij")
var field2 = "array"
var value2 = ["array contents"]
var hash = "test hash";
var field1 = "buffer";
var value1 = new Buffer("abcdefghij");
var field2 = "array";
var value2 = ["array contents"];
client.HMSET(hash, field1, value1, field2, value2, helper.isString("OK", done));
});

View File

@@ -50,7 +50,7 @@ describe("The 'multi' method", function () {
client.once("connect", function () {
client.flushdb(function (err) {
return done(err);
})
});
});
});

View File

@@ -32,7 +32,7 @@ describe("The 'renamenx' method", function () {
client.renamenx('foo', 'foo2', helper.isNumber(0));
client.exists('foo', helper.isNumber(1));
client.exists(['foo2'], helper.isNumber(1, done));
})
});
afterEach(function () {
client.end();

View File

@@ -21,11 +21,10 @@ describe("The 'script' method", function () {
client.once("connect", function () {
client.flushdb(function (err) {
if (!helper.serverVersionAtLeast(client, [2, 6, 0])) {
err = Error('script not supported in redis <= 2.6.0')
err = Error('script not supported in redis <= 2.6.0');
}
return done(err);
})
});
});
});
@@ -42,21 +41,21 @@ describe("The 'script' method", function () {
it('allows a loaded script to be evaluated', function (done) {
client.evalsha(commandSha, 0, helper.isString('99', done));
})
});
it('allows a script to be loaded as part of a chained transaction', function (done) {
client.multi().script("load", command).exec(function(err, result) {
assert.strictEqual(result[0], commandSha);
return done()
})
})
return done();
});
});
it("allows a script to be loaded using a transaction's array syntax", function (done) {
client.multi([['script', 'load', command]]).exec(function(err, result) {
assert.strictEqual(result[0], commandSha);
return done()
})
})
return done();
});
});
});
});
});

View File

@@ -70,7 +70,7 @@ describe("The 'select' method", function () {
it("emits an error", function (done) {
assert.strictEqual(client.selected_db, null, "default db should be null");
client.select(9999, function (err) {
assert.equal(err.message, 'ERR invalid DB index')
assert.equal(err.message, 'ERR invalid DB index');
return done();
});
});

View File

@@ -17,7 +17,7 @@ describe("The 'sort' method", function () {
client.once("error", done);
client.once("connect", function () {
client.flushdb();
setupData(client, done)
setupData(client, done);
});
});

View File

@@ -20,11 +20,10 @@ describe("The 'watch' method", function () {
client.once("connect", function () {
client.flushdb(function (err) {
if (!helper.serverVersionAtLeast(client, [2, 2, 0])) {
err = Error('some watch commands not supported in redis <= 2.2.0')
err = Error('some watch commands not supported in redis <= 2.2.0');
}
return done(err);
})
});
});
});
@@ -38,7 +37,7 @@ describe("The 'watch' method", function () {
var multi = client.multi();
multi.incr(watched);
multi.exec(helper.isNull(done));
})
});
it('successfully modifies other keys independently of transaction', function (done) {
client.set("unwatched", 200);