-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 location output not source-mapped #51392
Comments
My guess is this is not diredtly related to the test runner, do you have a minimal reproduction? |
@MoLow that repo/branch linked ^^^ is an attempt at a minimal reproduction, but I don't know enough about how it works to take Note that it is somewhat related to the test runner at least in the sense that it's the test runner output specifically that lacks correct location information. |
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: nodejs#51392
This commit transforms test locations to paths when V8 provides file URLs (which seems to be for ESM files). Fixes: #51610 PR-URL: #52010 Fixes: #51392 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: nodejs#51392 PR-URL: nodejs#52010 Fixes: nodejs#51610 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit transforms test locations to paths when V8 provides file URLs (which seems to be for ESM files). Fixes: nodejs#51610 PR-URL: nodejs#52010 Fixes: nodejs#51392 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: #51392 PR-URL: #52010 Fixes: #51610 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: nodejs#51392 PR-URL: nodejs#52010 Fixes: nodejs#51610 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit transforms test locations to paths when V8 provides file URLs (which seems to be for ESM files). Fixes: nodejs#51610 PR-URL: nodejs#52010 Fixes: nodejs#51392 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: nodejs#51392 PR-URL: nodejs#52010 Fixes: nodejs#51610 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit transforms test locations to paths when V8 provides file URLs (which seems to be for ESM files). Fixes: nodejs#51610 PR-URL: nodejs#52010 Fixes: nodejs#51392 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit adds support for source mapping test locations when the --enable-source-maps flag is present. Fixes: #51392 PR-URL: #52010 Backport-PR-URL: #52872 Fixes: #51610 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
This commit transforms test locations to paths when V8 provides file URLs (which seems to be for ESM files). Fixes: #51610 PR-URL: #52010 Backport-PR-URL: #52872 Fixes: #51392 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
I think the changes in v20.16.0 broke my project, because in v20.15.1 it works perfectly... :( Now I got However I can't find a minimal reproduction of this problem yet, I will open a new issue if I found it. |
Version
v21.3.0
Platform
Darwin wavel.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64
Subsystem
node:test
What steps will reproduce the bug?
I have checked in a simple example at
https://github.com/malthe/node/tree/source-map-test-issue.
Clone the repo and run the following commands.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
In the first line in the output, starting with "test at", notice that the location is being reported as "3:1".
But there is nothing on this line, it's empty. It should be "4:1". The "test at" location is not mapped, even though
--enable-source-maps
is given.In the stack trace provided for the assertion failure, locations are correct (mapped).
Note that if this option is not used at all, then both locations are wrong (i.e., unmapped).
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: