mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-03 09:48:31 +08:00
* test: cover prepareContext validation error branches create-prompt.test.ts exercised only happy paths; the ~20 validation guards in prepareContext (missing PR_NUMBER, unsupported event type, unsupported issue action, missing claude branch, etc.) had no coverage. Adds a "prepareContext validation errors" block asserting the thrown messages for the reachable guards, using the existing createMockContext helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test: cover comments/common link and body builders `src/github/operations/comments/common.ts` had no direct test coverage, though its exports are live code used by create-initial.ts and update-with-branch.ts. This adds unit tests for all four exports: SPINNER_HTML, createJobRunLink, createBranchLink, and createCommentBody. Assertions are built from the imported GITHUB_SERVER_URL so they hold on GHES as well as github.com. Pure test additions — no production changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>