deno
e8a90001 - fix(coverage): merge coverage for modules loaded with different hash/search params (#35354)

Commit
115 days ago
fix(coverage): merge coverage for modules loaded with different hash/search params (#35354) When the same module is imported with different URL hash fragments or search params (e.g. `mod.ts`, `mod.ts#wasm`, `mod.ts?wasm`), V8 records them as separate scripts. `deno coverage` keyed its merge on the full URL, so these variants showed up as separate entries each with partial coverage instead of being combined. Normalize `file:`/`http:`/`https:` coverage URLs by stripping the query and fragment before merging, so the variants are treated as a single module and their ranges are merged. Other schemes (e.g. `data:`) are left untouched since a `?`/`#` there can be part of the inline content. Closes #35351
Author
Parents
Loading