Start with the runner and runtime that already execute your tests.

Do you need a nyc wrapper, or does the runner own collection? Are tests loading original source or a transformed build? Choose that boundary first, then verify the file list and a deliberately missed branch.
Choose your runner
- Mocha coverage with nyc: a working first report
Set up CommonJS Mocha tests with nyc, exercise both branches of a small function, include untouched files and diagnose missing coverage.
- AVA coverage: choose the source-loading setup first
Wrap an existing AVA command with nyc, verify source and worker coverage, and distinguish CommonJS instrumentation from native module loading.
- Intern coverage: scope, reporters and source locations
Configure Intern’s coverage integration, target the executed application build, choose reporter aliases and diagnose missing browser data.
- Jest coverage: use its provider, scope and thresholds
Configure Jest’s built-in coverage, select babel or v8, include untouched source and set explicit thresholds without a second nyc wrapper.
- tap coverage today: V8 collection and Istanbul reports
Use tap’s current coverage controls, distinguish V8 collection from older nyc recipes, and configure coverage limits and reports deliberately.
Choose a transform or runtime guide
- ES2015, Babel and native modules: coverage boundaries
Choose whether nyc or Babel instruments JavaScript, preserve source maps, and separate modern syntax support from native ES module loading.
- IoT.js coverage: instrument on the host, collect on the target
Plan the IoT.js host-to-target coverage workflow: instrument a separate test build, persist JSON counters and render reports against matching source.
- TypeScript coverage: preserve maps and choose one build path
Use nyc’s TypeScript preset in a CommonJS ts-node setup, preserve maps and diagnose generated filenames, declarations and absent source.
- webpack coverage: collect from the browser build you test
Create a coverage-only Babel/webpack build, keep one instrumenter, preserve source maps and export browser counters before teardown.
Make the first report explainable
Keep the ordinary test command passing before adding coverage. Select a small function, exercise one of two outcomes and inspect the report. Add the missing assertion and confirm the corresponding path changes. This checks collection more directly than an output directory's existence.
Use all, include and exclude to keep untouched source visible. A report limited to loaded modules can omit the code you most wanted to notice.
Move on to reports and policy
Once collection works, choose a reporter and then thresholds for the intended dataset. The advanced guides cover custom data handoffs and multiple suites.
Primary sources
Check official documentation against the tools installed in your project. These explanations and examples are independent.