-
Notifications
You must be signed in to change notification settings - Fork 30k
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: support source mapped test locations #52010
Conversation
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: nodejs#51610
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
welcome back!
Can you add a test for inline source map as well? |
I think the existing source map implementation and tests could cover this sufficiently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that will be useful, for TypeScript users, that build their files to JavaScript to then execute the Node.js built-in test runner.
Does this support the --experimental-test-coverage
? So that the reported uncovered lines, are the ones from the source TypeScript file?
@@ -359,6 +370,21 @@ class Test extends AsyncResource { | |||
column: loc[1], | |||
file: loc[2], | |||
}; | |||
|
|||
if (sourceMaps === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why checking === true
and not using directly sourceMaps
?
if (sourceMaps) {
@theoludwig no, not yet. That is a separate change. |
Landed in 592c690...328642b |
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 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]>
Can you create a backport for v20, its not landing clean |
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]>
test_runner: support source mapped test locations
This commit adds support for source mapping test locations
when the
--enable-source-maps
flag is present.Fixes: #51392
test_runner: use paths for test locations
This commit transforms test locations to paths when V8 provides
file URLs (which seems to be for ESM files).
Fixes: #51610