Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner: account for newline in source maps #54444

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Aug 19, 2024

This commit updates the source mapping logic in the test runner to account for newline characters that are not included in line length calculations.

Fixes: #54240

@yume-chan would you like to be included as a coauthor on this PR? I added the Co-authored-by metadata, but I don't know what email address you'd like to use in it.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@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 Aug 19, 2024
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.32%. Comparing base (561bc87) to head (3b05904).
Report is 339 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/coverage.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54444   +/-   ##
=======================================
  Coverage   87.32%   87.32%           
=======================================
  Files         648      648           
  Lines      182359   182359           
  Branches    34981    34983    +2     
=======================================
  Hits       159239   159239           
+ Misses      16386    16384    -2     
- Partials     6734     6736    +2     
Files with missing lines Coverage Δ
lib/internal/test_runner/coverage.js 19.72% <0.00%> (ø)

... and 30 files with indirect coverage changes

@jakecastelli jakecastelli added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@nodejs-github-bot
Copy link
Collaborator

@RedYetiDev
Copy link
Member

FWIW @yume-chan appears to send their commits as Simon Chan <1330321+yume-chan@users.noreply.github.com> (ref)

This commit updates the source mapping logic in the test runner
to account for newline characters that are not included in line
length calculations.

Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Fixes: nodejs#54240
@cjihrig
Copy link
Contributor Author

cjihrig commented Aug 19, 2024

Thanks @RedYetiDev

@cjihrig cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 19, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Aug 20, 2024

@cjihrig cjihrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Aug 20, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 21, 2024
@nodejs-github-bot nodejs-github-bot merged commit 821ffab into nodejs:main Aug 21, 2024
58 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 821ffab

@cjihrig cjihrig deleted the coverage-bug branch August 21, 2024 02:40
RafaelGSS pushed a commit that referenced this pull request Aug 25, 2024
This commit updates the source mapping logic in the test runner
to account for newline characters that are not included in line
length calculations.

Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Fixes: #54240
PR-URL: #54444
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@RafaelGSS RafaelGSS mentioned this pull request Aug 25, 2024
@targos targos added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Sep 21, 2024
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 pending requests for changes, and a CI started. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test runner: Could not report code coverage (regression)
8 participants