Skip to content

Add tests for retry-after HTTP-date values #5

Description

@TDanks2000

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions