Description
Improve test coverage for the confidence scoring module in src/agent/confidence.ts.
Why
The confidence scoring module is critical for investigation quality but currently has limited test coverage. Adding tests helps ensure reliability and makes future changes safer.
What to do
- Look at
src/agent/confidence.ts to understand the confidence calculation logic - Create or extend
src/agent/__tests__/confidence.test.ts - Add test cases for:
- Edge cases (0%, 100% confidence)
- Multiple evidence sources
- Conflicting evidence handling
- Confidence threshold behavior
Example test structure
import{describe,test,expect}from"bun:test";import{calculateConfidence}from"../confidence";describe("confidence scoring",()=>{test("returns 0 with no evidence",()=>{// ...});test("increases confidence with supporting evidence",()=>{// ...});});Getting Started
bun install
bun test src/agent/__tests__/confidence.test.ts
Great for learning the testing patterns in this project!
Description
Improve test coverage for the confidence scoring module in
src/agent/confidence.ts.Why
The confidence scoring module is critical for investigation quality but currently has limited test coverage. Adding tests helps ensure reliability and makes future changes safer.
What to do
src/agent/confidence.tsto understand the confidence calculation logicsrc/agent/__tests__/confidence.test.tsExample test structure
Getting Started
bun install bun test src/agent/__tests__/confidence.test.tsGreat for learning the testing patterns in this project!