Skip to content

Add JavaScript SDK public mock integration tests - #6

Merged
wenbinf merged 1 commit into
mainfrom
fix/mock-integration-tests
Sep 24, 2026
Merged

wenbinf merged 1 commit into
mainfrom
fix/mock-integration-tests

Conversation

@wenbinf

@wenbinf wenbinf commented Sep 24, 2026

Copy link
Copy Markdown
Member

The SDK's default tests mock HTTP transports, so they cannot detect problems reaching the deployed mock API. Add an opt-in suite that sends real requests through both the Node/Axios and Workers/fetch clients.

  • Add yarn test-integration, with 12 shared cases per client covering search, podcast/playlist reads, all five playlist writes, response headers, and HTTP 404 handling.
  • Restrict requests to the public mock API, send no API key, disable redirects, and enforce request timeouts. Close timers and Miniflare connections after tests.
  • Keep default tests offline and run live integration checks in a separate Node.js 24 CI workflow.
  • Document local execution and the mock's limitations: fixed responses verify routing and response handling, not persistence or production authorization.

Validation: all 24 live integration tests passed against listen-api-test.listennotes.com; all 84 offline Node/Workers tests, lint, immutable dependency installation, and generated-file checks passed. No new dependencies or SDK runtime changes.

@wenbinf
wenbinf merged commit 741ef95 into main Sep 24, 2026
5 checks passed
@wenbinf
wenbinf deleted the fix/mock-integration-tests branch September 24, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant