$ X100_FAST=1 node --test --test-name-pattern="helpers of an earlier run|damaged helper ledger|helper rows are counted" test/closing-line.test.mjs
mutate closing-helpers
files lib/spend.mjs (lines 17 to 60)
planted 30 edits, every one this command can make here.
killed    19. The check failed on a planted defect.
survived  11. The check passed with the defect in place.
invalid   0. The edit left code that does not parse, so it was not run.
score     19 of 30 caught of the defects that ran, 63.3%.

survivors. Each is a defect the check did not notice.
  lib/spend.mjs:39  arithmetic: + becomes -
  lib/spend.mjs:39  number: 0 becomes 1
  lib/spend.mjs:39  number: 0 becomes 1
  lib/spend.mjs:40  arithmetic: + becomes -
  lib/spend.mjs:40  number: 0 becomes 1
  lib/spend.mjs:40  number: 0 becomes 1
  lib/spend.mjs:41  compare: === becomes !==
  lib/spend.mjs:46  logic: || becomes &&
  lib/spend.mjs:46  compare: >= becomes >
  lib/spend.mjs:58  compare: < becomes <=
  lib/spend.mjs:58  number: 1 becomes 0

next. Read each survivor: is it a gap in the check, or an edit that changes nothing? For a gap, add a case that fails with that defect in, then run this again. --min <percent> makes a lower score exit 1.

What this cannot show. A survivor is a defect the check did not notice, or an edit that changes nothing a person could see (an equivalent defect). Only a reader can tell which.
A count is about the defects planted and says nothing about the ones that were not.
Edits are single and come from a fixed list, so a defect that needs two is not measured.
The automatic edits read JavaScript and TypeScript. --edits takes a list of edits for any other language.

every defect
  killed    lib/spend.mjs:20  word: 'utf8' becomes 'object'. exit 1
  killed    lib/spend.mjs:20  word: 'utf8' becomes 'string'. exit 1
  killed    lib/spend.mjs:27  logic: && becomes ||. exit 1
  killed    lib/spend.mjs:27  compare: === becomes !==. exit 1
  killed    lib/spend.mjs:27  word: 'object' becomes 'utf8'. exit 1
  killed    lib/spend.mjs:27  word: 'object' becomes 'string'. exit 1
  killed    lib/spend.mjs:27  logic: && becomes ||. exit 1
  survived  lib/spend.mjs:39  arithmetic: + becomes -
  survived  lib/spend.mjs:39  number: 0 becomes 1
  survived  lib/spend.mjs:39  number: 0 becomes 1
  survived  lib/spend.mjs:40  arithmetic: + becomes -
  survived  lib/spend.mjs:40  number: 0 becomes 1
  survived  lib/spend.mjs:40  number: 0 becomes 1
  survived  lib/spend.mjs:41  compare: === becomes !==
  survived  lib/spend.mjs:46  logic: || becomes &&
  survived  lib/spend.mjs:46  compare: >= becomes >
  killed    lib/spend.mjs:53  condition: Date.parse(row.at) < sinceMs becomes true. exit 1
  killed    lib/spend.mjs:53  condition: Date.parse(row.at) < sinceMs becomes false. exit 1
  killed    lib/spend.mjs:53  compare: < becomes <=. exit 1
  killed    lib/spend.mjs:54  compare: === becomes !==. exit 1
  killed    lib/spend.mjs:54  word: 'string' becomes 'utf8'. exit 1
  killed    lib/spend.mjs:54  word: 'string' becomes 'object'. exit 1
  killed    lib/spend.mjs:54  logic: && becomes ||. exit 1
  killed    lib/spend.mjs:55  number: 0 becomes 1. exit 1
  killed    lib/spend.mjs:55  arithmetic: + becomes -. exit 1
  killed    lib/spend.mjs:55  number: 1 becomes 0. exit 1
  survived  lib/spend.mjs:58  compare: < becomes <=
  killed    lib/spend.mjs:58  number: 1 becomes 0. exit 1
  survived  lib/spend.mjs:58  number: 1 becomes 0
  killed    lib/spend.mjs:58  arithmetic: - becomes +. exit 1
