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

chore: improve coverage

This commit is contained in:
Ruben Bridgewater
2017-05-30 06:45:28 +02:00
parent 31fafd8b7c
commit b6c317dbb0
8 changed files with 82 additions and 12 deletions

View File

@ -71,6 +71,14 @@ describe('The \'client\' method', () => {
promises.push(client.get('foo').then(helper.isString('bar')))
return Promise.all(promises)
})
it('weird', function () {
helper.serverVersionAtLeast.call(this, client, [3, 2, 0])
assert.strictEqual(client._reply, 'ON')
const promise = client.client('REPLY', 'WEIRD').then(helper.fail, helper.isError())
assert.strictEqual(client._reply, 'ON')
return promise
})
})
describe('in a batch context', () => {
@ -112,6 +120,14 @@ describe('The \'client\' method', () => {
assert.deepStrictEqual(res, ['OK', undefined, undefined, 'bar'])
})
})
it('weird', function () {
helper.serverVersionAtLeast.call(this, client, [3, 2, 0])
assert.strictEqual(client._reply, 'ON')
const promise = client.batch().client('REPLY', 'WEIRD').exec().then(helper.fail, helper.isError())
assert.strictEqual(client._reply, 'ON')
return promise
})
})
})