Repository navigation
test(#317): add unit tests for exported utility functions - #346
Merged
Merged
Conversation
…esForIssue Export determinePhasesForIssue for testability. Add 15 new tests covering diff stat parsing (happy path, edge cases, failures) and phase determination logic (testgen insertion, UI label detection, immutability). Fixes #317
Cover resume=true/false paths, all-completed, none-completed, and immutability of input array.
6 tasks
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
determinePhasesForIssuefor unit testabilitygetWorktreeDiffStats(parsing git diff stat output, edge cases, error handling)determinePhasesForIssue(testgen insertion, UI label detection, phase ordering, immutability)Context
Most functions listed in #317 already had test coverage. The remaining gaps were:
getWorktreeDiffStats— zero tests (now 6)determinePhasesForIssue— not exported, zero tests (now exported + 9 tests)filterResumedPhases— already well-tested inrun-resume.test.tsTest plan
run.test.tspassfilterResumedPhasesalready covered inrun-resume.test.ts(7 tests)Fixes #317
🤖 Generated with Claude Code