A code coverage API for JavaScript aiming at relevance, accuracy, simplicity, flexibility and speed (v1.0.2). It leverages V8's built-in coverage for fast, accurate results without instrumenting code. The API is designed to be minimal and composable, catering to both programmatic use and integration with test runners. Ships TypeScript types. Released under ISC license. Known for being lighter and faster than c8 or Istanbul, but with a different API paradigm.
npm install one-double-zero-coreVerified import paths — ran on the pinned version, not inferred.
Shows basic usage: initialize coverage with include/exclude patterns, then take snapshot after tests.
Use explicit Coverage and Instrumenter classes; refer to docs for programmatic usage.
Always await coverage.load() at the start of your test setup.
Set exclude: [] to include node_modules (not recommended).
Ensure you use import coverage from 'one-double-zero-core' with ESM and appropriate tsconfig (esModuleInterop: true).
Check that coverage.load() was awaited and options are correct.
No dependency data recorded yet.