From 020ef0057f83e5d1cbad11ad69a0f067ea15ea22 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 19 Jan 2019 23:18:57 -0800 Subject: [PATCH] fix: reading file URL spec; windows uses / --- lib/report.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/report.js b/lib/report.js index ac5bdb5e6..53145fbbe 100644 --- a/lib/report.js +++ b/lib/report.js @@ -119,8 +119,8 @@ class Report { _normalizeProcessCov (v8ProcessCov) { const result = [] for (const v8ScriptCov of v8ProcessCov.result) { - if (/^file:[\\/]{2}/.test(v8ScriptCov.url)) { - v8ScriptCov.url = v8ScriptCov.url.replace(/^file:[\\/]{2}/, '') + if (/^file:[/]{2}/.test(v8ScriptCov.url)) { + v8ScriptCov.url = v8ScriptCov.url.replace(/^file:[/]{2}/, '') } if (this.exclude.shouldInstrument(v8ScriptCov.url) && (!this.omitRelative || isAbsolute(v8ScriptCov.url))) {