-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
sourcesContent not correctly handled in coverage reporter with --enable-source-maps
#55106
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
Comments
|
In v22.9.0, there is no difference in the output with/without |
sourcesContent not correctly handled in coverage reportersourcesContent not correctly handled in coverage reporter with --enable-source-maps
|
On node When executed Error This entry returns an The coverage report is displayed anyways Full output |
|
Okay, I reached the expected behavior. Let me confirm. |
|
I Just opened a still-drafted pr. With source maps: Without source maps: |
PR-URL: nodejs#55228 Refs: nodejs#55106 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
PR-URL: nodejs#55228 Refs: nodejs#55106 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>


Version
node-v23.0.0-nightly202409243c5ceff85f
Platform
Subsystem
test_runner
What steps will reproduce the bug?
The Node.js coverage reporter does not correctly handle source maps with a custom
sourcesContentand--with-source-maps.This example was taken from the
test-runner/coveragefixture:Output
{ "version": 3, "sources": ["stdin.test.ts"], "sourcesContent": ["import { test } from 'node:test';\ntest('ok', () => {});\n\nfunction uncovered() {\n return 'uncovered';\n}\n\n"], "mappings": ";AAAA,uBAAqB;AAAA,IACrB,uBAAK,MAAM,MAAM;AAAC,CAAC;", "names": [] }node --test --experimental-test-coverage --enable-source-mapswithnode --test --experimental-test-coverageHow often does it reproduce? Is there a required condition?
Everytime
What is the expected behavior? Why is that the expected behavior?
Without
--enable-source-maps:What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: