FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test_runner: fix coverage report when --enable-source-maps is provided by geeksilva97 · Pull Request #55228 · nodejs/node · GitHub

/ node Public

test_runner: fix coverage report when --enable-source-maps is provided - #55228

Merged
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
geeksilva97:issue-55106
Oct 8, 2024
Merged

test_runner: fix coverage report when --enable-source-maps is provided#55228
nodejs-github-bot merged 3 commits into
nodejs:mainfrom
geeksilva97:issue-55106

Conversation

geeksilva97 commented Oct 1, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Refs: #55106 #54753

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

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 Oct 1, 2024

Copy link
Copy Markdown
Member

I bring with me my concerns from the other PR, but I'm curious what others think

geeksilva97 changed the title Issue 55106 test_runner: fix coverage report when --enable-source-maps is provide Oct 1, 2024
geeksilva97 changed the title test_runner: fix coverage report when --enable-source-maps is provide test_runner: fix coverage report when --enable-source-maps is provided Oct 1, 2024

Copy link
Copy Markdown
Contributor Author

I bring with me my concerns from the other PR, but I'm curious what others think

Now I see what you meant. I will dig into it.

Comment thread lib/internal/test_runner/test.js Outdated

codecov Bot commented Oct 5, 2024
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.

Project coverage is 88.40%. Comparing base (deb5eff) to head (6391e6e).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/coverage.js 44.44% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55228      +/-   ##
==========================================
- Coverage   88.41%   88.40%   -0.02%     
==========================================
  Files         652      652              
  Lines      186756   186785      +29     
  Branches    36100    36101       +1     
==========================================
- Hits       165126   165119       -7     
- Misses      14906    14931      +25     
- Partials     6724     6735      +11     
Files with missing lines Coverage Δ
lib/internal/test_runner/coverage.js 63.82% <44.44%> (-0.83%) ⬇️

... and 33 files with indirect coverage changes

Copy link
Copy Markdown
Contributor Author

Codecov Report

Attention: Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.

Project coverage is 88.40%. Comparing base (98788da) to head (c0deb06).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/coverage.js 44.44% 15 Missing ⚠️
Additional details and impacted files

@@            Coverage Diff             @@
##             main   #55228      +/-   ##
==========================================
+ Coverage   87.89%   88.40%   +0.51%     
==========================================
  Files         652      652              
  Lines      186589   186638      +49     
  Branches    35750    36054     +304     
==========================================
+ Hits       163999   165003    +1004     
+ Misses      15816    14904     -912     
+ Partials     6774     6731      -43     

Files with missing lines Coverage Δ
lib/internal/test_runner/coverage.js 63.86% <44.44%> (-0.83%) ⬇️
... and 96 files with indirect coverage changes

how's this possible?

Copy link
Copy Markdown
Member

how's this possible?

In my experience, codecov isn't always exactly accurate. Regardless, it's nothing to be concerned about.

avivkeller added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Oct 6, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 6, 2024

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

geeksilva97 commented Oct 7, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

EDIT: on CI, mine fails. Not sure what caused that.

If you can reproduce the failure locally, it might help to have it log the output to see what the actual difference is.

It's the assertion on stdout

TAP version 13
# Subtest: /Users/edysilva/projects/contributions/node/test/fixtures/test-runner/source-maps/invalid-json/index.js
ok 1 - /Users/edysilva/projects/contributions/node/test/fixtures/test-runner/source-maps/invalid-json/index.js
  ---
  duration_ms: 38.544167
  ...
1..1
# Warning: Could not report code coverage. TypeError: Cannot read properties of null (reading 'sourcesContent')
# tests 1
# suites 0
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 43.42

this message is not being printed.


When I run ./node --test --experimental-test-coverage --test-reporter tap test/fixtures/test-runner/source-maps/missing-sources/index.js it prints the message though.

TAP version 13
# Subtest: test/fixtures/test-runner/source-maps/missing-sources/index.js
ok 1 - test/fixtures/test-runner/source-maps/missing-sources/index.js
  ---
  duration_ms: 301.77525
  ...
1..1
# Warning: Could not report code coverage. Error [ERR_SOURCE_MAP_MISSING_SOURCE]: Cannot find 'file:///Users/edysilva/projects/contributions/node/test/fixtures/test-runner/source-maps/missing-sources/nonexistent.js' imported from the source map for 'file:///Users/edysilva/projects/contributions/node/test/fixtures/test-runner/source-maps/missing-sources/index.js'
# tests 1
# suites 0
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 305.851208

Sorry @redyetidev . Newbie working. I think I need to recompile

Copy link
Copy Markdown
Member

Try rebasing to include your other PR?

marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 8, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 8, 2024

Copy link
Copy Markdown
Collaborator

atlowChemi added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 8, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 8, 2024
nodejs-github-bot merged commit 3a42085 into nodejs:main Oct 8, 2024

Copy link
Copy Markdown
Collaborator

Landed in 3a42085

cjihrig commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

This Refs two issues. Does it actually fix either/both of them?

geeksilva97 commented Oct 8, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

This Refs two issues. Does it actually fix either/both of them?

I'd say yes. I'm pretty sure it solves #54753. Could you confirm for #55106 @redyetidev ?

avivkeller commented Oct 8, 2024
edited
Loading

Copy link
Copy Markdown
Member

There aren't any tests to confirm that, can you no longer reproduce the errors described? I would assume your other PR fixes that one

aduh95 pushed a commit that referenced this pull request Oct 9, 2024
PR-URL: #55228
Refs: #55106
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
aduh95 mentioned this pull request Oct 9, 2024
aduh95 added dont-land-on-v18.x dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Oct 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL