Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c41e77a

Browse files
taki9bahmutov
andauthoredDec 10, 2020
fix: Handle backslashes in coverage file path (#356)
Co-authored-by: Gleb Bahmutov <[email protected]>
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)
Please sign in to comment.