mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-07-27 22:38:30 +08:00
* test: add unit tests for parseGitHubContext and context type guards Covers all supported webhook event types (entity and automation), the pull_request_target normalization, isPR detection for comments on pull requests, env-derived input defaults and parsing, and the nine type guard functions. Raises src/github/context.ts line coverage from 26.5% to 100%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: assert all env-derived inputs to close mutation testing gaps Mutation testing (StrykerJS, 138 mutants) showed 22 surviving mutants in the env input parsing of parseGitHubContext: fields like trackProgress, includeFixLinks, allowedBots and the comment actor filters were never asserted. Asserting every input field in both the defaults and the explicit-values tests, plus covering the optional chaining on payload.repository, brings the mutation score for src/github/context.ts from 84.06% to 100%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>