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

Replace jshint with eslint and add lots of rules

Fix eslint errors accordingly
This commit is contained in:
Ruben Bridgewater
2016-03-26 04:05:43 +01:00
parent 12579e5e8e
commit 94e9f1fcfc
98 changed files with 1621 additions and 1551 deletions

View File

@@ -1,36 +1,36 @@
'use strict';
var config = require("../lib/config");
var helper = require("../helper");
var config = require('../lib/config');
var helper = require('../helper');
var assert = require('assert');
var redis = config.redis;
describe("The 'zadd' method", function () {
helper.allTests(function(parser, ip, args) {
helper.allTests(function (parser, ip, args) {
describe("using " + parser + " and " + ip, function () {
describe('using ' + parser + ' and ' + ip, function () {
var client;
beforeEach(function (done) {
client = redis.createClient.apply(null, args);
client.once("ready", function () {
client.once('ready', function () {
client.flushdb(done);
});
});
it('reports an error', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();
client.zadd('infinity', [+'5t', "should not be possible"], helper.isError(done));
client.zadd('infinity', [+'5t', 'should not be possible'], helper.isError(done));
});
it('return inf / -inf', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();
helper.serverVersionAtLeast.call(this, client, [3, 0, 2]);
client.zadd('infinity', [+Infinity, "should be inf"], helper.isNumber(1));
client.zadd('infinity', [+Infinity, 'should be inf'], helper.isNumber(1));
client.zadd('infinity', ['inf', 'should be also be inf'], helper.isNumber(1));
client.zadd('infinity', -Infinity, "should be negative inf", helper.isNumber(1));
client.zadd('infinity', [99999999999999999999999, "should not be inf"], helper.isNumber(1));
client.zadd('infinity', -Infinity, 'should be negative inf', helper.isNumber(1));
client.zadd('infinity', [99999999999999999999999, 'should not be inf'], helper.isNumber(1));
client.zrange('infinity', 0, -1, 'WITHSCORES', function (err, res) {
assert.equal(res[5], 'inf');
assert.equal(res[1], '-inf');