You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
chore: use standard
This commit is contained in:
@@ -1,40 +1,38 @@
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
var config = require('../lib/config');
|
||||
var helper = require('../helper');
|
||||
var redis = config.redis;
|
||||
var config = require('../lib/config')
|
||||
var helper = require('../helper')
|
||||
var redis = config.redis
|
||||
|
||||
describe("The 'hincrby' method", function () {
|
||||
describe('The \'hincrby\' method', function () {
|
||||
helper.allTests(function (ip, args) {
|
||||
describe('using ' + ip, function () {
|
||||
var client
|
||||
var hash = 'test hash'
|
||||
|
||||
helper.allTests(function (ip, args) {
|
||||
beforeEach(function (done) {
|
||||
client = redis.createClient.apply(null, args)
|
||||
client.once('ready', function () {
|
||||
client.flushdb(done)
|
||||
})
|
||||
})
|
||||
|
||||
describe('using ' + ip, function () {
|
||||
var client;
|
||||
var hash = 'test hash';
|
||||
it('increments a key that has already been set', function (done) {
|
||||
var field = 'field 1'
|
||||
|
||||
beforeEach(function (done) {
|
||||
client = redis.createClient.apply(null, args);
|
||||
client.once('ready', function () {
|
||||
client.flushdb(done);
|
||||
});
|
||||
});
|
||||
client.hset(hash, field, 33)
|
||||
client.hincrby(hash, field, 10, helper.isNumber(43, done))
|
||||
})
|
||||
|
||||
it('increments a key that has already been set', function (done) {
|
||||
var field = 'field 1';
|
||||
it('increments a key that has not been set', function (done) {
|
||||
var field = 'field 2'
|
||||
|
||||
client.hset(hash, field, 33);
|
||||
client.hincrby(hash, field, 10, helper.isNumber(43, done));
|
||||
});
|
||||
client.hincrby(hash, field, 10, helper.isNumber(10, done))
|
||||
})
|
||||
|
||||
it('increments a key that has not been set', function (done) {
|
||||
var field = 'field 2';
|
||||
|
||||
client.hincrby(hash, field, 10, helper.isNumber(10, done));
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
afterEach(function () {
|
||||
client.end(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user