Skip to content

test: add comprehensive tests for lib/git.ts (20 tests) - #254

Open
TerminalGravity wants to merge 2 commits into
mainfrom
test/git-run-coverage-mar15
Open

test: add comprehensive tests for lib/git.ts (20 tests)#254
TerminalGravity wants to merge 2 commits into
mainfrom
test/git-run-coverage-mar15

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Adds unit tests for the core git helper module (src/lib/git.ts).

Coverage:

  • run() — array args, string args, timeout, ENOENT, stderr fallback, generic failure
  • getBranch(), getStatus(), getRecentCommits(), getLastCommit(), getLastCommitTime(), getStagedFiles()
  • getDiffFiles() — success, HEAD~1 fallback, 'no commits' fallback
  • getDiffStat() — success, HEAD~3 fallback, fallback message

Brings test count from 43 → 63.

Shows 4 concrete scenarios: vague prompt clarification, multi-step
scoping, correction pattern matching, and cross-service awareness.
Each example includes the prompt, triage classification, and the
actual output users can expect.

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

20 tests for git.ts — solid coverage addition. 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