You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix: client duplicate function now allows db param to be passed
This commit is contained in:
committed by
Ruben Bridgewater
parent
66d5a50467
commit
19c80c617c
@@ -120,11 +120,14 @@ describe('The node_redis client', function () {
|
||||
});
|
||||
|
||||
it('check if all new options replaced the old ones', function (done) {
|
||||
client.selected_db = 1;
|
||||
var client2 = client.duplicate({
|
||||
db: 2,
|
||||
no_ready_check: true
|
||||
});
|
||||
assert(client.connected);
|
||||
assert(!client2.connected);
|
||||
assert.notEqual(client.selected_db, client2.selected_db);
|
||||
assert.strictEqual(client.options.no_ready_check, undefined);
|
||||
assert.strictEqual(client2.options.no_ready_check, true);
|
||||
assert.notDeepEqual(client.options, client2.options);
|
||||
|
Reference in New Issue
Block a user