Background:
The retry behaviour supports retry-after values as either seconds or HTTP-date
strings. Existing tests cover retry behaviour broadly; adding a focused HTTP-date
case would make this behaviour easier to protect.
Proposed change:
Add a unit test that returns a 429 response with an HTTP-date retry-after
header and verifies the retry path completes with a successful follow-up
response.
Acceptance criteria:
- A test covers an HTTP-date
retry-after value.
- The test uses a deterministic short wait so the suite stays fast.
- The test verifies that the final successful response is returned.
bun run test passes.
Files likely involved:
src/__tests__/client.test.ts
src/client/BaseHttpClient.ts for source reference only
Background:
The retry behaviour supports
retry-aftervalues as either seconds or HTTP-datestrings. Existing tests cover retry behaviour broadly; adding a focused HTTP-date
case would make this behaviour easier to protect.
Proposed change:
Add a unit test that returns a 429 response with an HTTP-date
retry-afterheader and verifies the retry path completes with a successful follow-up
response.
Acceptance criteria:
retry-aftervalue.bun run testpasses.Files likely involved:
src/__tests__/client.test.tssrc/client/BaseHttpClient.tsfor source reference only