Skip to main content

collect_coverage

Function collect_coverage 

Source
pub fn collect_coverage(
    v8_dir: &Path,
    out_js_root: &Path,
    out_root: &Path,
    source_root: &Path,
) -> Result<CoverageReport>
Expand description

Collect coverage from a finished run and attribute it to .bynk source.

  • v8_dir — the directory NODE_V8_COVERAGE was pointed at.
  • out_js_root — where the executed .js and tsc’s .js.map live.
  • out_root — where the emitted .ts and the emitter’s .ts.map live.
  • source_root — the project root the .bynk paths are relativised against.

Any file it cannot read or parse is skipped rather than failing the run — coverage is a report about a run that already happened, so a partial map should degrade the numbers, never abort. Reading the V8 directory is the one hard error surfaced (it is the runner’s own temp dir).