We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90ccb19 commit 7aca5b0Copy full SHA for 7aca5b0
packages/redis/test/test.ts
@@ -481,4 +481,18 @@ describe('KeyvRedis Iterators', () => {
481
const keyvRedis = keyv.store as KeyvRedis<string>;
482
expect((keyvRedis.client as RedisClientType).options?.url).toBe('redis://localhost:6379');
483
});
484
+
485
+ test('should go to the RedisClientOptions if passed in', async () => {
486
+ const reconnectStrategy = (times: number) => Math.min(times * 50, 2000);
487
488
+ const keyvRedis = new KeyvRedis({
489
+ socket: {
490
+ host: 'localhost',
491
+ port: 6379,
492
+ reconnectStrategy,
493
+ },
494
+ });
495
496
+ expect((keyvRedis.client as RedisClientType).options?.socket?.reconnectStrategy).toBe(reconnectStrategy);
497
498
0 commit comments