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: improve coverage
This commit is contained in:
@@ -413,6 +413,20 @@ describe('connection tests', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('connects correctly even if the info command returns a empty string', (done) => {
|
||||
client = Redis.createClient.apply(null, args)
|
||||
const end = helper.callFuncAfter(done, 2)
|
||||
client.info = function () {
|
||||
// Mock the result
|
||||
end()
|
||||
return Promise.resolve('')
|
||||
}
|
||||
client.once('ready', () => {
|
||||
assert.strictEqual(Object.keys(client.serverInfo).length, 0)
|
||||
end()
|
||||
})
|
||||
})
|
||||
|
||||
if (ip === 'IPv4') {
|
||||
it('allows connecting with the redis url to the default host and port, select db 3 and warn about duplicate db option', (done) => {
|
||||
client = Redis.createClient('redis:///3?db=3')
|
||||
|
Reference in New Issue
Block a user