mutation-testing

Solid

Validate test effectiveness with mutation testing using Stryker (TypeScript/JavaScript with Vitest or bun test via @hughescr/stryker-bun-runner) and mutmut (Python). Find weak tests that pass despite code mutations. Use to improve test quality.

Testing & QA 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Mutation Testing Expert knowledge for mutation testing - validating that your tests actually catch bugs by introducing deliberate code mutations. ## Core Concept - **Mutants**: Small code changes introduced automatically - **Killed**: Test fails with mutation (good - test caught the bug) - **Survived**: Test passes with mutation (bad - weak test) - **Score**: Percentage of mutants killed (aim for 80%+) ## TypeScript/JavaScript (Stryker) ### Vitest Runner #### Installation ```bash # Using Bun bun add -d @stryker-mutator/core @stryker-mutator/vitest-runner # Using npm npm install -D @stryker-mutator/core @stryker-mutator/vitest-runner ``` #### Configuration ```typescript // stryker.config.mjs export default { packageManager: 'bun', reporters: ['html', 'clear-text', 'progress'], testRunner: 'vitest', coverageAnalysis: 'perTest', mutate: ['src/**/*.ts', '!src/**/*.test.ts'], thresholds: { high: 80, low: 60, break: 60 }, incremental: true, } ``` ### Bun Native Runner (`bun test`) Use when projects use `bun test` directly (not Vitest). #### Requirements - Bun **>= 1.3.7** (needs TestReporter WebSocket events from Bun PR #25986) - `@stryker-mutator/core ^9.0.0` #### Installation ```bash bun add -D @hughescr/stryker-bun-runner @stryker-mutator/core ``` #### Configuration ```javascript // stryker.conf.mjs export default { testRunner: 'bun', coverageAnalysis: 'perTest', mutate: ['src/**/*.ts', '!src/**/*.test.ts'], thresholds: { high: 80, low: ...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category