Skip to content

feat: integrate Stryker mutation testing with Vitest runner#57

Merged
PAMulligan merged 9 commits into
mainfrom
11-integrate-mutation-testing-with-stryker
Apr 15, 2026
Merged

feat: integrate Stryker mutation testing with Vitest runner#57
PAMulligan merged 9 commits into
mainfrom
11-integrate-mutation-testing-with-stryker

Conversation

@PAMulligan
Copy link
Copy Markdown
Collaborator

Summary

  • Add @stryker-mutator/core, @stryker-mutator/vitest-runner, and @stryker-mutator/typescript-checker as devDependencies
  • Create stryker.config.json with Vitest runner, TypeScript checker, and React JSX mutation patterns (src/**/*.{ts,tsx} excluding tests, stories, type defs)
  • Add scripts/run-mutation-tests.sh with --threshold, --json, and --help flags — reads threshold from pipeline.config.json, gracefully skips when Stryker not installed or no source files
  • Wire mutation-score into quality gate subtasks in pipeline.config.json orchestration config
  • Add Stryker config template at templates/shared/stryker.config.json for generated projects
  • 6 tests covering CLI behavior, JSON output structure, and edge cases (232 total tests passing)

Test plan

  • ./scripts/run-mutation-tests.sh --help exits 0 with usage text
  • ./scripts/run-mutation-tests.sh --bogus exits 1 with "Unknown flag"
  • ./scripts/run-mutation-tests.sh --json outputs valid JSON with status, score, threshold, sourceFiles fields
  • ./scripts/run-mutation-tests.sh --threshold 90 --json respects custom threshold
  • ./scripts/run-mutation-tests.sh --threshold (no value) exits 1 with clear error
  • ./scripts/run-mutation-tests.sh shows "Mutation Testing" header and skips gracefully when no src/
  • All 232 tests pass (pnpm vitest run)
  • pipeline.config.json is valid JSON after edit

Closes #11

🤖 Generated with Claude Code

Paul Mulligan and others added 9 commits April 14, 2026 13:04
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Set +x bit for direct execution
- Include score, threshold, and sourceFiles fields in all JSON outputs
  for consistent parsing by consumers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… to 30

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Guard --threshold flag against missing value (was crashing with unbound variable)
- Replace grep -oP (Perl regex) with grep -oE for macOS portability
- Correct script count to 29 (was incorrectly set to 30)
- Update Last Updated date to 2026-04-14
- Add test for --threshold without value edge case

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PAMulligan PAMulligan linked an issue Apr 14, 2026 that may be closed by this pull request
@PAMulligan PAMulligan self-assigned this Apr 15, 2026
@PAMulligan PAMulligan added enhancement New feature or request javascript Pull requests that update javascript code pipeline Figma/Canva-to-React conversion pipeline labels Apr 15, 2026
@PAMulligan PAMulligan added this to the v1.1.0 milestone Apr 15, 2026
@PAMulligan PAMulligan merged commit faa9b7a into main Apr 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update javascript code pipeline Figma/Canva-to-React conversion pipeline

Projects

Development

Successfully merging this pull request may close these issues.

Integrate mutation testing with Stryker

1 participant