From 360b619c33c10548e49041766a529fc7c35ef961 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Fri, 9 Jun 2023 15:08:59 -0500 Subject: [PATCH] tests: add test case for redis uri scheme covering provision: or the value from the key-value pair from the "query" URI field with the key "db" --- packages/client/lib/client/index.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/client/lib/client/index.spec.ts b/packages/client/lib/client/index.spec.ts index a0824e440ba..994e8a0c07f 100644 --- a/packages/client/lib/client/index.spec.ts +++ b/packages/client/lib/client/index.spec.ts @@ -65,6 +65,19 @@ describe('Client', () => { ); }); + it('redis://localhost:6379?db=0', () => { + assert.deepEqual( + RedisClient.parseURL('redis://localhost:6379?db=0'), + { + socket: { + host: 'localhost', + port: 6379 + }, + database: 0 + } + ); + }); + it('rediss://user:secret@localhost:6379/0', () => { assert.deepEqual( RedisClient.parseURL('rediss://user:secret@localhost:6379/0'),