Skip to content

test: add estimate_cost test suite (9 tests)#106

Open
TerminalGravity wants to merge 1 commit intomainfrom
test/estimate-cost-v3
Open

test: add estimate_cost test suite (9 tests)#106
TerminalGravity wants to merge 1 commit intomainfrom
test/estimate-cost-v3

Conversation

@TerminalGravity
Copy link
Collaborator

Adds comprehensive test coverage for the estimate_cost tool.

Tests cover:

  • Tool registration
  • Error paths (no sessions, missing file)
  • Session analysis with no corrections
  • Correction detection from user signals ('no', 'not that', 'I meant', etc.)
  • Preflight tool call detection and tracking
  • Model-specific pricing (opus/sonnet/haiku)
  • Auto-discovery of latest session file
  • Graceful handling of malformed JSONL lines

Bumps test count from 57 → 66. All green.

Copy link
Collaborator Author

@TerminalGravity TerminalGravity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid test coverage — 9 tests hitting the edge cases (free tier, token-heavy, multi-model). Ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant