{"id":44724679,"url":"https://github.com/adrian-bueno/fetchquack","last_synced_at":"2026-02-26T07:29:29.708Z","repository":{"id":338147165,"uuid":"1153880143","full_name":"adrian-bueno/fetchquack","owner":"adrian-bueno","description":"A lightweight TypeScript HTTP client with support for streaming, SSE, progress monitoring and interceptors.","archived":false,"fork":false,"pushed_at":"2026-02-13T02:33:38.000Z","size":612,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T11:06:21.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrian-bueno.png","metadata":{"files":{"readme":"README-tests.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-09T19:22:40.000Z","updated_at":"2026-02-12T00:00:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adrian-bueno/fetchquack","commit_stats":null,"previous_names":["adrian-bueno/fetchquack"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adrian-bueno/fetchquack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrian-bueno%2Ffetchquack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrian-bueno%2Ffetchquack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrian-bueno%2Ffetchquack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrian-bueno%2Ffetchquack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrian-bueno","download_url":"https://codeload.github.com/adrian-bueno/fetchquack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrian-bueno%2Ffetchquack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29536527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-15T17:00:26.109Z","updated_at":"2026-02-17T07:01:19.434Z","avatar_url":"https://github.com/adrian-bueno.png","language":"TypeScript","funding_links":[],"categories":["Architecture and Advanced Topics"],"sub_categories":["HTTP"],"readme":"# Tests for fetchquack\n\nComprehensive test suite for the fetchquack library across all supported runtimes: **Node.js**, **Deno**, **Bun**, and **Browser**.\n\n## Quick Start\n\n### Run All Tests\n\n```bash\n# From project root\nbun run test\n\n# Or run specific runtime\nbun run test node\nbun run test deno\nbun run test bun\nbun run test browser\n```\n\nThe test runner automatically:\n- Starts isolated mock servers for each runtime on dedicated ports\n- Installs dependencies if needed\n- Runs the test suite\n- Cleans up servers on completion or failure\n\n## Structure\n\n```\ntest/\n├── run-tests.ts              # Cross-platform TypeScript test runner\n├── mock-server/              # Standalone mock HTTP server\n│   ├── server.ts             # Server implementation with static file serving\n│   ├── static-server.ts      # Static file server for browser tests\n│   ├── test-page.esm.html    # ESM test page for browser tests\n│   └── test-page.iife.html   # IIFE test page for browser tests\n├── node/                     # Node.js tests (Vitest)\n│   ├── package.json\n│   ├── vitest.config.ts\n│   └── tests/\n│       ├── http-client.test.ts\n│       ├── sse-retry-policy.test.ts\n│       ├── gen-ai-compatibility.test.ts\n│       └── repro-sse-reconnect.test.ts\n├── deno/                     # Deno tests (Deno.test)\n│   ├── deno.json\n│   └── tests/\n│       └── ...               # Same test files as node/\n├── bun/                      # Bun tests (Bun test)\n│   ├── package.json\n│   └── tests/\n│       └── ...               # Same test files as node/\n└── browser/                  # Browser tests (Playwright)\n    ├── package.json\n    ├── playwright.config.ts\n    └── tests/\n        └── ...               # Same test files as node/\n```\n\n## Test Infrastructure\n\n### Mock Server\n\nThe mock server (`test/mock-server/server.ts`) provides:\n\n- **API Endpoints**: JSON responses, streaming, SSE, errors, delays\n- **Static File Serving**: Browser bundles and test pages\n- **CORS Support**: Proper headers for browser tests\n- **Configurable Ports**: Via `--port` flag\n- **Static Mode**: Via `--static` flag for browser tests\n\n### Port Allocation\n\nEach runtime uses an isolated mock server instance:\n\n| Runtime | Port |\n|---------|------|\n| Node.js | 3001 |\n| Deno    | 3002 |\n| Bun     | 3003 |\n| Browser | 3004 |\n\n## Development\n\n### Adding New Tests\n\n1. Add the test to `test/node/tests/` (reference implementation)\n2. Copy the test to all other runtime test files:\n   - `test/deno/tests/`\n   - `test/bun/tests/`\n   - `test/browser/tests/`\n3. Adjust syntax for runtime-specific test framework if needed (Vitest, Deno.test, Bun test, Playwright)\n4. Update mock server endpoints if needed in `test/mock-server/server.ts`\n5. Run `bun test/run-tests.ts` to verify all runtimes pass\n\n### Test Files\n\n| File | Description |\n|------|-------------|\n| `http-client.test.ts` | Core HTTP client functionality |\n| `sse-retry-policy.test.ts` | SSE retry and reconnection logic |\n| `gen-ai-compatibility.test.ts` | Generative AI streaming compatibility |\n| `repro-sse-reconnect.test.ts` | SSE reconnection edge cases |\n\n### Debugging\n\nRun with verbose output:\n\n```bash\n# Node.js - see full Vitest output\ncd test/node \u0026\u0026 npm test\n\n# Deno - see detailed test results\ncd test/deno \u0026\u0026 deno task test\n\n# Bun - verbose output\ncd test/bun \u0026\u0026 bun test --verbose\n\n# Browser - headed mode with UI\ncd test/browser \u0026\u0026 npx playwright test --headed --ui\n```\n\n## Requirements\n\n- **Bun**: Required for test runner script and mock server\n- **Node.js 18+**: For Node.js runtime tests (uses Vitest)\n- **Deno 1.11+**: For Deno runtime tests\n- **Playwright**: For browser testing (automatically installed via npm)\n\n### Before Running Tests\n\nBuild the library:\n\n```bash\nnpm run build\n```\n\nThis ensures the `dist/` directory contains the latest built files used by the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrian-bueno%2Ffetchquack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrian-bueno%2Ffetchquack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrian-bueno%2Ffetchquack/lists"}