Skip to content

Commit c41e77a

Browse files
taki9bahmutov
andauthored
fix: Handle backslashes in coverage file path (#356)
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
1 parent a5a9664 commit c41e77a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

task-utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ function includeAllFiles(nycFilename, nycOptions) {
343343

344344
const nycCoverage = JSON.parse(readFileSync(nycFilename, 'utf8'))
345345
const coverageKeys = Object.keys(nycCoverage)
346-
const coveredPaths = coverageKeys.map((key) => nycCoverage[key].path)
346+
const coveredPaths = coverageKeys.map(key =>
347+
nycCoverage[key].path.replace(/\\/g, '/')
348+
)
347349

348350
debug('coverage has %d record(s)', coveredPaths.length)
349351
// report on first couple of entries

0 commit comments

Comments
 (0)