Skip to content

Commit

Permalink
fixup: fix configs typo
Browse files Browse the repository at this point in the history
  • Loading branch information
geeksilva97 committed Oct 1, 2024
1 parent bddb6cf commit 4b1fa1f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/internal/test_runner/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,13 @@ class TestCoverage {
continue;
}

ArrayPrototypeForEach(this.getLines(newUrl), (mappedLine) => {
if (!linesToCover.has(mappedLine.line)) {
mappedLine.ignore = true;
}
});
if (this.sourceMaps) {
ArrayPrototypeForEach(this.getLines(newUrl), (mappedLine) => {
if (!linesToCover.has(mappedLine.line)) {
mappedLine.ignore = true;
}
});
}

const newScript = newResult.get(newUrl) ?? { __proto__: null, url: newUrl, functions: [] };
ArrayPrototypePush(newScript.functions, { __proto__: null, functionName, ranges: newRanges, isBlockCoverage });
Expand Down Expand Up @@ -531,7 +533,7 @@ function setupCoverage(options) {
cwd,
options.coverageExcludeGlobs,
options.coverageIncludeGlobs,
options.sourceMap,
options.sourceMaps,
{
__proto__: null,
line: options.lineCoverage,
Expand Down

0 comments on commit 4b1fa1f

Please sign in to comment.