# Henka: tests for your tests

A green test suite tells you the tests passed. It doesn't tell you they'd fail if the code were wrong. **Henka** (変化, "change") checks that: it breaks your code on purpose, one small change at a time, runs your tests after each, and lists every change no test caught. On debuff's own effects package, with 94% line coverage, 132 of Henka's 266 changes passed every test, including one that sends every particle the wrong way ([what it found](/research/what-coverage-missed)).

```bash
npm install -D henka
npx henka
```

```
✔ caught   src/score.ts:3:15 hits * 2 → hits / 2
✖ missed   src/score.ts:2:12 hits  runMyTests(),
  mutants: () => [{ id: "timeout=0", label: "request timeout 30 s → 0", expect: "noticed" }],
  run: (mutant) => runMyTests({ apply: mutant.id }),
});
writeOut(report, "mutants.out");
```

## Limits

- `npx henka` needs Vitest. debuff games test with Keiko, so for now they get param mutants only; source mutants through Keiko come next.
- A run makes a few hundred mutants for a small package and takes minutes. We haven't benchmarked it against other tools under the same load yet, so we make no speed claim.
- Some mutants change nothing a test could see. Mark those lines `// henka-skip`.

Henka is MIT-licensed and has no runtime dependencies. Try it on your next branch:

```bash
npx henka --since main
```