mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 22:16:41 +00:00
- Add centralized mock infrastructure in tests/mocks/: - mock-fetch.ts: Bun native fetch interception - mock-http-server.ts: Fake server responses (no ports) - fixtures/responses.ts: Preset response constants - types.ts: Mock type definitions - Refactor https-tunnel-proxy.test.ts: - Remove TEST_CERT constant (~50 lines) - Remove real HTTPS server creation - Use invalid hosts for error path testing - 26/26 tests pass in ~430ms - Refactor remote-token-uploader.test.ts: - Replace 7 real HTTP servers with mockFetch - Reduce from 422 to 289 lines - 18/18 tests pass in ~120ms - Add global test timeout (10s) in bunfig.toml Test suite: 10+ min → 14 seconds