Raise a package's coverage floor
Input: a package directory (for example packages/txpool) and optionally a
target line-coverage percentage. Without a target, raise every threshold by
five points or to what the new run measures, whichever is lower.
- Run the package's coverage (
vitest run --coveragein the package; never the baretestscript, which is interactive). Readcoverage/coverage-summary.jsonand list the files with the lowest line and branch coverage. - For each of the lowest files, read the implementation and write the
missing cases in the colocated
<name>.spec.ts. Tests use real objects:createTevmNode(),createMemoryClient(), real compiled contracts from@tevm/test-utils, recorded RPC snapshots. Novi.mock, novi.fnon tevm objects (CLAUDE.md, testing conventions). - Cover error paths through the real error classes in
@tevm/errors: assert on the error name and message, not on a mock being called. - Re-run coverage. Raise
thresholdsin the package'svitest.config.tsto the measured values rounded down to two decimals, and never above what the run measured. Do not touchautoUpdate. - Run the package's full test suite and its typecheck. Every test passes.
Do not change implementation files to make coverage easier. If a file is unreachable dead code, report it in your final message instead of testing it.