MCPcopy Index your code
hub / github.com/simstudioai/sim / captureRetryStrategy

Function captureRetryStrategy

apps/sim/lib/core/config/redis.test.ts:210–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208
209 describe('retryStrategy', () => {
210 function captureRetryStrategy(): (times: number) => number {
211 let capturedConfig: Record<string, unknown> = {}
212 MockRedisConstructor.mockImplementation(
213 class {
214 constructor(_url: string, config: Record<string, unknown>) {
215 capturedConfig = config
216 Object.assign(this, { ping: vi.fn(), on: vi.fn() })
217 }
218 }
219 )
220
221 getRedisClient()
222
223 return capturedConfig.retryStrategy as (times: number) => number
224 }
225
226 it('should use exponential backoff with jitter', () => {
227 const retryStrategy = captureRetryStrategy()

Callers 1

redis.test.tsFile · 0.85

Calls 1

getRedisClientFunction · 0.90

Tested by

no test coverage detected