Why
Most of the app depends on provider responses that can change over time. If one parser breaks, Usage Radar can accidentally show confusing or incomplete data.
A few focused tests would make the risky parts much easier to change with confidence.
What I want
Add tests around the small pieces of logic that decide what the user sees.
Good first targets:
- Codex usage windows become 5h and weekly bars correctly
- Copilot quota fallback handles percent remaining, remaining/entitlement, and missing reset timing honestly
- OpenCode Go usage page parsing handles rolling, weekly, and optional monthly usage
- summary selection picks the lowest percent-left bar
- stale refresh failures keep last-known data during the grace period
- unavailable state only takes over when data is too old or missing
Done when
- the core parsing and display-rule helpers have test coverage
- tests do not require real provider credentials or network calls
- fixtures do not include real tokens, cookies, or personal account data
cargo test can run locally without special setup
Notes
I would rather have a small set of high-signal tests than a broad test suite that is hard to maintain.
Why
Most of the app depends on provider responses that can change over time. If one parser breaks, Usage Radar can accidentally show confusing or incomplete data.
A few focused tests would make the risky parts much easier to change with confidence.
What I want
Add tests around the small pieces of logic that decide what the user sees.
Good first targets:
Done when
cargo testcan run locally without special setupNotes
I would rather have a small set of high-signal tests than a broad test suite that is hard to maintain.