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: report error on missing sourcemap source #55037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

@RedYetiDev RedYetiDev commented Sep 21, 2024

Fixes #54756

ERR_SOURCE_MAP_MISSING_SOURCE is now thrown when a sourcemap contains a reference to a non-existent file.


@jaydenseric provided the test fixture, and @cjihrig provided the initial patch.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Sep 21, 2024
'# index.ts | 100.00 | 100.00 | 100.00 | ',
'# ------------------------------------------------------------------',
'# all files | 100.00 | 100.00 | 100.00 | ',
'# ------------------------------------------------------------------',
Copy link
Member Author

Choose a reason for hiding this comment

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

Review note

I moved source-map-line-lengths into source-map/line-lengths, hence this change.

@RedYetiDev RedYetiDev added coverage Issues and PRs related to native coverage support. source maps Issues and PRs related to source map support. labels Sep 21, 2024
Fixes nodejs#54756

Co-Authored-By: Colin Ihrig <cjihrig@gmail.com>
Co-Authored-By: Jayden Seric <me@jaydenseric.com>
Copy link

codecov bot commented Sep 21, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.23%. Comparing base (8b8fc53) to head (4badc52).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/coverage.js 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55037      +/-   ##
==========================================
- Coverage   88.23%   88.23%   -0.01%     
==========================================
  Files         652      652              
  Lines      183855   183864       +9     
  Branches    35856    35855       -1     
==========================================
+ Hits       162227   162230       +3     
- Misses      14909    14914       +5     
- Partials     6719     6720       +1     
Files with missing lines Coverage Δ
lib/internal/errors.js 96.98% <100.00%> (+<0.01%) ⬆️
lib/internal/test_runner/coverage.js 64.74% <62.50%> (-0.03%) ⬇️

... and 26 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coverage Issues and PRs related to native coverage support. errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. source maps Issues and PRs related to source map support. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad error message in --experimental-test-coverage output when a source maps source module is missing
2 participants