Skip to content

test: add 16 unit tests for scorePrompt covering all scoring dimensions - #132

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

test: add 16 unit tests for scorePrompt covering all scoring dimensions#132
TerminalGravity wants to merge 1 commit into
mainfrom
test/prompt-score-coverage-v3

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Adds comprehensive unit test coverage for the scorePrompt function in prompt-score.ts.

Changes:

  • Export scorePrompt for direct testability
  • 16 tests covering all 4 scoring dimensions (specificity, scope, actionability, done-condition)
  • Tests for grade assignment (A+ through F), feedback generation, and total calculation
  • All 59 tests pass (existing + new)

- Export scorePrompt function for testability
- Test all 4 scoring dimensions: specificity, scope, actionability, done-condition
- Test grade assignment (A+ through F)
- Test feedback generation for low/high scoring prompts
- Verify total equals sum of dimensions

@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.

Tests look solid — good coverage across all four scoring dimensions plus grade boundaries. One minor note: the engine bump to node>=20 in package-lock.json looks like it snuck in from another branch. If intentional, worth calling out in the PR description. Otherwise LGTM.

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Closing — superseded by a newer version of this test PR.

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