You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
chore: refactor codebase to promises
This commit is contained in:
@@ -10,14 +10,12 @@ describe('The \'zscan\' method', () => {
|
||||
describe(`using ${ip}`, () => {
|
||||
let client
|
||||
|
||||
beforeEach((done) => {
|
||||
beforeEach(() => {
|
||||
client = redis.createClient.apply(null, args)
|
||||
client.once('ready', () => {
|
||||
client.flushdb(done)
|
||||
})
|
||||
return client.flushdb()
|
||||
})
|
||||
|
||||
it('return values', function (done) {
|
||||
it('return values', function () {
|
||||
if (helper.redisProcess().spawnFailed()) this.skip()
|
||||
helper.serverVersionAtLeast.call(this, client, [2, 8, 0])
|
||||
const hash = {}
|
||||
@@ -31,11 +29,9 @@ describe('The \'zscan\' method', () => {
|
||||
client.hmset('hash:1', hash)
|
||||
client.sadd('set:1', set)
|
||||
client.zadd(zset)
|
||||
client.zscan('zset:1', 0, 'MATCH', '*', 'COUNT', 500, (err, res) => {
|
||||
assert(!err)
|
||||
return client.zscan('zset:1', 0, 'MATCH', '*', 'COUNT', 500).then((res) => {
|
||||
assert.strictEqual(res.length, 2)
|
||||
assert.strictEqual(res[1].length, 1000)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user