Skip to content

test: add prompt-score and estimate-cost unit tests (+28 tests) - #20

Closed
TerminalGravity wants to merge 1 commit into
mainfrom
test/prompt-score-coverage
Closed

test: add prompt-score and estimate-cost unit tests (+28 tests)#20
TerminalGravity wants to merge 1 commit into
mainfrom
test/prompt-score-coverage

Conversation

@TerminalGravity

@TerminalGravity TerminalGravity commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Bumps test count from 43 → 71.

  • Exports scorePrompt() so it can be unit tested directly
  • 17 new tests for prompt scoring: specificity, scope, actionability, done condition, grading, feedback
  • 11 new tests for estimate-cost helpers: token estimation, formatTokens, formatCost, formatDuration

No behavior changes — just testability and coverage.

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

✅ Reviewed — good coverage. Tests verify each scoring dimension independently and check grade boundaries. The minimal export change is correct. Ready to merge.

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good prompt-score coverage. LGTM 👍

@TerminalGravity
TerminalGravity force-pushed the test/prompt-score-coverage branch from 2d20f5f to cf93e32 Compare March 2, 2026 20:45
@TerminalGravity TerminalGravity changed the title test: add 17 tests for prompt_score scoring logic test: add prompt-score and estimate-cost unit tests (+28 tests) Mar 2, 2026
Export scorePrompt() and add comprehensive tests covering:
- All four scoring dimensions (specificity, scope, actionability, done-condition)
- Grade boundaries (A+ for excellent, D/F for vague)
- Feedback generation (improvement tips vs congratulatory)
- Score arithmetic invariant (dimensions sum to total)

Bumps test count from 43 → 58.
@TerminalGravity
TerminalGravity force-pushed the test/prompt-score-coverage branch from cf93e32 to 9d46dcf Compare March 4, 2026 00:45
@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Superseded by newer PRs.

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