Commit Graph

3 Commits

Author SHA1 Message Date
NianJiuZst 790f897528 fix: harden SSE stream parsing 2026-05-11 12:12:35 +08:00
yuanhe cfbeb9140f fix: resolve all lint errors in test files
- Replace require() with dynamic import in timeout-fix test
- Fix unused variable in stream test
- Replace no-explicit-any casts with Config type in models test
2026-05-11 10:13:09 +08:00
hell0gunawan d9a1e6b7ab test: add parseSSE coverage (src/client/stream.ts)
Adds 11 tests covering the SSE parsing function used by all
streaming commands (text chat, speech synthesize, etc.).

Coverage: 0% -> 100% line, 0% -> 100% branch

Test cases:
- Single and multiple sequential SSE events
- event:, id:, data: field parsing
- Comment lines (": ...") are skipped
- Multi-line data concatenation
- Lines without colon (malformed) are skipped
- Empty data field handling
- Null body response
- Reader lock release after iteration
2026-04-20 08:28:51 +08:00