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 parts out of the index.js file
This commit is contained in:
@@ -8,7 +8,7 @@ const intercept = require('intercept-stdout')
|
||||
|
||||
describe('The \'blpop\' method', () => {
|
||||
helper.allTests((ip, args) => {
|
||||
describe(`using ${ip}`, () => {
|
||||
describe.only(`using ${ip}`, () => {
|
||||
let client
|
||||
let bclient
|
||||
|
||||
|
@@ -52,7 +52,7 @@ describe('The \'info\' method', () => {
|
||||
assert.strictEqual(err.code, 'UNCERTAIN_STATE')
|
||||
assert.strictEqual(err.command, 'INFO')
|
||||
})
|
||||
client.stream.destroy()
|
||||
client._stream.destroy()
|
||||
return promise
|
||||
})
|
||||
})
|
||||
|
@@ -107,7 +107,7 @@ describe('The \'monitor\' method', () => {
|
||||
// End after a reconnect
|
||||
return done()
|
||||
}
|
||||
client.stream.destroy()
|
||||
client._stream.destroy()
|
||||
client.mget('hello', 'world')
|
||||
called = true
|
||||
})
|
||||
@@ -127,7 +127,7 @@ describe('The \'monitor\' method', () => {
|
||||
// End after a reconnect
|
||||
return done()
|
||||
}
|
||||
client.stream.destroy()
|
||||
client._stream.destroy()
|
||||
client.mget('hello', 'world')
|
||||
called = true
|
||||
})
|
||||
@@ -138,7 +138,7 @@ describe('The \'monitor\' method', () => {
|
||||
assert.strictEqual(err.code, 'UNCERTAIN_STATE')
|
||||
})
|
||||
client.on('error', () => {}) // Ignore error here
|
||||
client.stream.destroy()
|
||||
client._stream.destroy()
|
||||
const end = helper.callFuncAfter(done, 2)
|
||||
client.on('monitor', (time, args, rawOutput) => {
|
||||
assert.strictEqual(client.monitoring, true)
|
||||
@@ -171,7 +171,7 @@ describe('The \'monitor\' method', () => {
|
||||
client.subscribe('/foo', '/bar')
|
||||
client.unsubscribe('/bar')
|
||||
setTimeout(() => {
|
||||
client.stream.destroy()
|
||||
client._stream.destroy()
|
||||
client.once('ready', () => {
|
||||
pub.publish('/foo', 'hello world')
|
||||
})
|
||||
|
@@ -64,7 +64,7 @@ describe('The \'select\' method', () => {
|
||||
it('selects the appropriate database after a reconnect', (done) => {
|
||||
assert.strictEqual(client.selectedDb, undefined, 'default db should be undefined')
|
||||
client.select(3)
|
||||
client.set('foo', 'bar').then(() => client.stream.destroy())
|
||||
client.set('foo', 'bar').then(() => client._stream.destroy())
|
||||
client.once('ready', () => {
|
||||
assert.strictEqual(client.selectedDb, 3)
|
||||
assert(typeof client.serverInfo.db3 === 'object')
|
||||
|
Reference in New Issue
Block a user