diff --git a/packages/client/lib/client/index.spec.ts b/packages/client/lib/client/index.spec.ts index a0824e440ba..4a55cd8fd96 100644 --- a/packages/client/lib/client/index.spec.ts +++ b/packages/client/lib/client/index.spec.ts @@ -81,6 +81,20 @@ describe('Client', () => { ); }); + it('unix://user:secret@/path/to/sock?db=0', () => { + assert.deepEqual( + RedisClient.parseURL('unix://user:secret@/path/to/sock?db=0'), + { + socket: { + path: '/path/to/sock' + }, + username: 'user', + password: 'secret', + database: 0 + } + ); + }); + it('Invalid protocol', () => { assert.throws( () => RedisClient.parseURL('redi://user:secret@localhost:6379/0'),