Skip to content

Commit

Permalink
fix: reading file URL spec; windows uses /
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jan 20, 2019
1 parent 64de0c5 commit 020ef00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit 020ef00

Please sign in to comment.