Skip to content

Commit

Permalink
test_runner: remove redundant check from coverage
Browse files Browse the repository at this point in the history
The code coverage reporting logic already filters out URLs that
don't start with 'file:', so there is no need to also filter
out URLs that start with 'node:'.
  • Loading branch information
cjihrig committed May 19, 2023
1 parent 1918241 commit 07c4c65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/test_runner/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ function mergeCoverage(merged, coverage) {
const { url } = newScript;

// Filter out core modules and the node_modules/ directory from results.
if (StringPrototypeStartsWith(url, 'node:') ||
StringPrototypeIncludes(url, '/node_modules/') ||
if (StringPrototypeIncludes(url, '/node_modules/') ||
// On Windows some generated coverages are invalid.
!StringPrototypeStartsWith(url, 'file:')) {
continue;
Expand Down

0 comments on commit 07c4c65

Please sign in to comment.