test_runner: support source mapped test locations #52010
test_runner: support source mapped test locations #52010cjihrig wants to merge 2 commits intonodejs:mainfrom
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:
|
|
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.
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?
| file: loc[2], | ||
| }; | ||
|
|
||
| if (sourceMaps === true) { |
There was a problem hiding this comment.
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
|
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
test_runner: support source mapped test locations
This commit adds support for source mapping test locations
when the
--enable-source-mapsflag 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