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

Fix explicitly passing undefined as callback

This commit is contained in:
Ruben Bridgewater
2015-10-02 20:20:56 +02:00
parent 977d4dba2b
commit 2ca42417bf
7 changed files with 240 additions and 218 deletions

View File

@@ -20,12 +20,16 @@ describe("The 'zadd' method", function () {
});
it('reports an error', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();
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 negative 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.zrange('infinity', 0, -1, 'WITHSCORES', function (err, res) {
assert.equal(res[5], 'inf');