UNPKG

wundertec-core

Version:

Librería estándar de utilidades e integraciones AWS + helpers generales

10 lines (8 loc) 348 B
import { exponentialBackoff } from "../../src/retry/backoff"; describe("exponentialBackoff()", () => { it("calculates exponential delays capped by maxDelay", () => { expect(exponentialBackoff(0, 100, 1000)).toBe(100); expect(exponentialBackoff(1, 100, 1000)).toBe(200); expect(exponentialBackoff(5, 100, 1000)).toBe(1000); }); });