test: add unit tests for parseGitHubContext and context type guards by mateuscmtropical · Pull Request #1404 · anthropics/claude-code-action (original) (raw)
and others added 2 commits
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
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
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request
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
[ Show hidden characters]({{ revealButtonHref }})