1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +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 async = require("async");
var assert = require("assert");
var config = require("./lib/config");
@@ -249,7 +251,7 @@ describe("The node_redis client", function () {
try {
domain = require('domain').create();
} catch (err) {
console.log("Skipping " + name + " because this version of node doesn't have domains.");
console.log("Skipping test because this version of node doesn't have domains.");
return done();
}
@@ -257,7 +259,7 @@ describe("The node_redis client", function () {
domain.run(function () {
client.set('domain', 'value', function (err, res) {
assert.ok(process.domain);
var notFound = res.not.existing.thing; // ohhh nooooo
throw new Error('ohhhh noooo');
});
});
@@ -316,7 +318,7 @@ describe("The node_redis client", function () {
});
client2.on("message", function (channel, data) {
if (channel == name) {
if (channel === name) {
assert.equal(data, "some message");
throw Error('forced exception');
}
@@ -736,7 +738,7 @@ describe("The node_redis client", function () {
});
assert.throws(function () {
cli.set('foo', 'bar');
client.set('foo', 'bar');
});
assert.doesNotThrow(function () {