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

feat: parse info data as numbers if possible and improve parsing

This commit is contained in:
Ruben Bridgewater
2017-05-28 00:12:36 +02:00
parent 8da9e98fe6
commit 8c63233968
14 changed files with 91 additions and 65 deletions

View File

@@ -80,10 +80,11 @@ if (process.platform !== 'win32') {
// Set a key so the used database is returned in the info command
promises.push(client.set('foo', 'bar'))
promises.push(client.get('foo'))
assert.strictEqual(client.serverInfo.db2, undefined)
const space = client.serverInfo.keyspace
assert.strictEqual(space && space.db2, undefined)
// Using the info command should update the serverInfo
promises.push(client.info().then(() => {
assert(typeof client.serverInfo.db2 === 'object')
assert.strictEqual(typeof client.serverInfo.keyspace.db2, 'object')
}))
promises.push(client.flushdb())
return Promise.all(promises).then(() => done())