story-kit: create 123_story_test_coverage_llm_providers_anthropic_rs
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: "Add test coverage for llm/providers/anthropic.rs (0% -> 50%+)"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Story 123: Add test coverage for llm/providers/anthropic.rs
|
||||||
|
|
||||||
|
Currently at 0% line coverage (204 lines). The Anthropic provider handles API communication for Claude models.
|
||||||
|
|
||||||
|
## What to test
|
||||||
|
|
||||||
|
- Request construction (headers, body format, model selection)
|
||||||
|
- Response parsing (streaming chunks, tool use responses, error responses)
|
||||||
|
- API key validation
|
||||||
|
- Rate limit / error handling
|
||||||
|
- Message format conversion (internal Message -> Anthropic API format)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Mock HTTP responses rather than calling the real Anthropic API
|
||||||
|
- Use `mockito` or similar for HTTP mocking, or test the pure functions directly
|
||||||
|
- Focus on serialization/deserialization and error paths
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
- [ ] Line coverage for `llm/providers/anthropic.rs` reaches 50%+
|
||||||
|
- [ ] Tests pass with `cargo test`
|
||||||
|
- [ ] `cargo clippy` clean
|
||||||
Reference in New Issue
Block a user