Mutation testing for pull requests | JS · TS

Green checks can lie. See what your tests miss.

BonaFident makes small changes to the code in your pull request, the way a bug would, and checks whether your tests fail. It is mutation testing for JavaScript and TypeScript, scoped to the diff. It runs on your CI runner, and only the report is uploaded.

No account needed. Runs on your machine with Node 22+ and Jest or Vitest: $ npx bonafident@latest audit --local

Simulated walkthrough
src/billing/ledger.ts Source
tests/ledger.spec.ts Test: asserts its own mock
TERMINAL OUTPUT PROBLEMS (0)
No model in the loop · 0 LLM tokens
$ npx bonafident@latest audit --local
Simulated output with illustrative figures. Press play to start.

Runs on your CI runner. By default only the report is uploaded, never your source text.

  • GitHub Actions

    Native merge gate (the BonaFident check), OIDC attestation, Evidence Ledger and a pull request comment. No API key.

  • GitLab CI

    Merge request note and report upload. The job fails on a policy breach.

    No merge gate check, attestation or ledger yet.

  • Bitbucket Pipelines and any CI with Node 22+

    Runs a full audit, uploads the report and fails the job on a policy breach.

    No pull request comment, attestation or ledger yet.

Coverage versus mutation testing

A passing build is a claim. This is the evidence.

Line coverage says the code ran. Mutation testing says whether a test would notice if the code were wrong. Drag the slider to compare both views of the same illustrative pull request.

Line coverage: 87% → Mutants killed: 34%
BonaFident check: Blocked
34.1% killed

The tests killed 34.1% of the mutants. The three below survived: the tests ran each changed line and still passed. In enforce mode the merge waits for a fix.

Survived: if (!valid) changed to if (valid)
Survived: totalAmount <= 0 changed to < 0
Survived: return recordLedgerEntry(...) changed to return null
// Each one is a test you can write before you merge
● No model in the loop Check: Blocked
Tests only: PASS
87% line coverage

Jest or Vitest reports 14 passing tests. Most lines ran, so the coverage report looks healthy, but it cannot say whether a test would fail if a line were wrong.

✓ settlePayment > should execute balance update
✓ settlePayment > handles tenant validation
✓ settlePayment > emits telemetry audit event
// Status: green build, merge allowed
● Jest / Vitest Check: Passed
< >
Killed Caught by a test
34.1%
A test failed on the change

BonaFident changed the code and at least one assertion failed. That is what a working test does.

Counts toward the score 0 LLM tokens
Survived Fix these first
52.6%
Tests ran it and still passed

The tests executed the changed code and passed anyway, for example because they assert only on their own mocks.

Counts toward the score Needs a test
No coverage Not run by any test
13.3%
No test executes these lines

The changed lines never ran under any test, so BonaFident lists them separately instead of scoring them.

Listed, not scored Add coverage

Illustrative example, not a measured run. The three shares add up to all the mutants in this example.

No model in the loop

Don't ask one AI to grade another.

A second model can share the first one's blind spots, and it bills per token. BonaFident runs your own tests against small changes to your code, so there is no model to pay for.

What we do not do

No second AI grading the first

BonaFident does not send your repository to a model and ask whether a test looks right. It changes the code and lets your tests answer.

Model tokens None. No per-token cost.
Source upload None by default
Out of time Reported as Incomplete, never Passed
What it costs

Your tests, on your runner

Every finding names the line, the change and the test result behind it, so you can check it yourself.

Model tokens $0
Compute Your CI minutes
Run time Within a budget you set
Uploaded report Paths, lines, operators, keyed hashes
Outcome: a list of changes your tests missed
A time budget you set

An audit that runs out of time says Incomplete, never Passed.

On a pull request BonaFident changes only the lines the diff touched and runs only the tests that cover them, within the time budget in your bonafident.yml.

Illustrative example Diff-scoped

Pull-request check

Every pull request gets its own verdict, scoped to the lines it changed.

Modified files in PR 14 files (+420 / -112)
Mutants 342
Run time 01:18.4 min
Mutants killed 98.4% · 1.6% survived
Illustrative example Full sweep

Scheduled full sweep

A scheduled run over the whole codebase instead of one diff, for a periodic picture of where tests are thin.

Files checked
1,204
Mutants
18,590
Run time
12m 45s
Budget
30m
Share of the time budget used 43%
Illustrative figures. Your times depend on your suite. Over budget: Incomplete
JavaScript and TypeScript, by design

Built for the stack you already ship.

BonaFident runs your Jest or Vitest tests in-process instead of restarting them for every change. That runtime is JavaScript and TypeScript today, on Node 22 or newer.

TypeScript
JavaScript (ESM, CJS)
React / JSX
Next.js
Vue SFCpartial
Sveltepartial
Jest
Vitest

Not supported yet: Python, Go, Rust, Java. Tell us which one you need first.

CI-First Deployment

Stop merging
on faith.

One command on your own machine. No GitHub App, no API key, and your source code never leaves it.

$
Source stays in your CI
Checksum-verified engine
Tamper-evident ledger
Only the report is uploaded
© 2026 BonaFident. All rights reserved.
Source stays in your CI