GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_runner: remove redundant check from coverage by cjihrig · Pull Request #48070 · nodejs/node

Conversation

@cjihrig

@cjihrig cjihrig commented May 19, 2023

Copy link
Copy Markdown
Contributor

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:'.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot

nodejs-github-bot commented May 19, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels May 19, 2023
@MoLow

MoLow commented May 19, 2023

Copy link
Copy Markdown
Member

I am not sure I understand why this is redundant

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed May 19, 2023
View reviewed changes
Comment thread lib/internal/test_runner/coverage.js Outdated
Comment on lines 381 to 387

@aduh95 aduh95 May 19, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we start with the file: check so core modules can still skip the /node_modules/ check? I suggest we also remove the comment which looks a bit out of place/context.

Suggested change
if (StringPrototypeIncludes(url, '/node_modules/') ||
// On Windows some generated coverages are invalid.
!StringPrototypeStartsWith(url, 'file:')) {
if (!StringPrototypeStartsWith(url, 'file:') || StringPrototypeIncludes(url, '/node_modules/')) {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cjihrig cjihrig May 19, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove the comment. I think having the node_modules check first will be more beneficial in real world apps where the node_modules directory makes up the bulk of the app.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ljharb and MoLow reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

@aduh95 aduh95 May 19, 2023

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, maybe add a comment explaining the order was chosen purposefully and why

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@cjihrig

cjihrig commented May 19, 2023

Copy link
Copy Markdown
Contributor Author

I am not sure I understand why this is redundant

All of the valid coverages should start with file: or node:, but we aren't interested in reporting coverage for the core files. I have a plan to support explicit includes and excludes in the future so someone could still opt back in to getting coverage for core files. Coverage URLs that start with node: fall into the category of URLs that don't start with file:, so the check is redundant.

MoLow reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cjihrig
test_runner: remove redundant check from coverage
095cc79
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:'.
@cjihrig
cjihrig force-pushed the remove-check branch from 07c4c65 to 095cc79 Compare May 26, 2023 20:25
@nodejs-github-bot

nodejs-github-bot commented May 26, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/51973/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 27, 2023
CI Reliability 2023-05-27 nodejs/reliability#578
Open
19 tasks
aduh95
aduh95 approved these changes May 27, 2023
View reviewed changes
@github-actions github-actions Bot mentioned this pull request May 28, 2023
CI Reliability 2023-05-28 nodejs/reliability#579
Open
20 tasks
MoLow
MoLow approved these changes May 28, 2023
View reviewed changes
@MoLow MoLow added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label May 28, 2023
@nodejs-github-bot

nodejs-github-bot commented May 28, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/51983/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 28, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/51984/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 29, 2023
CI Reliability 2023-05-29 nodejs/reliability#580
Open
22 tasks
debadree25
debadree25 approved these changes May 29, 2023
View reviewed changes
@debadree25 debadree25 added the commit-queue PRs queued for automated landing through the Commit Queue. label May 29, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 29, 2023
@nodejs-github-bot
nodejs-github-bot merged commit b47fce0 into nodejs:main May 29, 2023
@nodejs-github-bot

nodejs-github-bot commented May 29, 2023

Copy link
Copy Markdown
Collaborator

Landed in b47fce0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 30, 2023
CI Reliability 2023-05-30 nodejs/reliability#581
Open
23 tasks
targos pushed a commit that referenced this pull request May 30, 2023
@cjihrig @targos
test_runner: remove redundant check from coverage
15336c3
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:'.

PR-URL: #48070
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
This was referenced May 31, 2023
CI Reliability 2023-05-31 nodejs/reliability#582
Open
CI Reliability 2023-06-02 nodejs/reliability#583
Open
CI Reliability 2023-06-03 nodejs/reliability#584
Open
CI Reliability 2023-06-04 nodejs/reliability#585
Open
@targos targos mentioned this pull request Jun 4, 2023
v20.3.0 release proposal #48332
Merged
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
@cjihrig @danielleadams
test_runner: remove redundant check from coverage
edda045
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:'.

PR-URL: #48070
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
@cjihrig @MoLow
test_runner: remove redundant check from coverage
d1295d7
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:'.

PR-URL: nodejs#48070
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@cjihrig @Ceres6
test_runner: remove redundant check from coverage
b2c97bb
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:'.

PR-URL: nodejs#48070
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@cjihrig @Ceres6
test_runner: remove redundant check from coverage
705b833
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:'.

PR-URL: nodejs#48070
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@MoLow MoLow MoLow approved these changes
@aduh95 aduh95 aduh95 approved these changes
+1 more reviewer
@debadree25 debadree25 debadree25 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@cjihrig @nodejs-github-bot @MoLow @aduh95 @debadree25
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.