Source under test
Tests (expect(...).toBe(...) / .toEqual(...))
Try a sample
—
mutation score
Click Run mutation pass to generate mutants and score your tests.
Per-mutant results
How the metric maps to test quality
- Killed mutant: at least one test failed when the code was broken. The test was sensitive to that change — a good signal.
- Surviving mutant: every test still passed even though the code was wrong. The suite has a gap there.
- Mutation score = killed / total. High coverage with low mutation score is the classic warning sign of "tests that execute the code but assert nothing meaningful."
This playground is a teaching tool — real tools (Stryker, Pitest, cargo-mutants) work at the AST level and ignore equivalent mutants. Here we do source-string substitution, so some "surviving" mutants may be syntactically equivalent rather than genuinely uncovered. The educational point still holds: a low mutation score means your tests aren't asserting on what changed.