Skip to main content

normalize_script

Function normalize_script 

Source
pub fn normalize_script(input: &ScriptInput<'_>) -> IstanbulFileCoverage
Expand description

Convert one V8 ScriptCoverage entry into an IstanbulFileCoverage.

Each V8 FunctionCoverage contributes one Istanbul function entry whose hit count is taken from the function’s first range (the outermost [startOffset, endOffset)). Block-level sub-ranges are deliberately not flattened into separate functions — that’s the closed-source three-state tracker’s job.