-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 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>
- Loading branch information
1 parent
592c690
commit 6d625fe
Showing
7 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Flags: --enable-source-maps | ||
import { test } from 'node:test'; | ||
import { strictEqual } from 'node:assert'; | ||
test('fails', () => { | ||
strictEqual(1, 2); | ||
}); | ||
//# sourceMappingURL=source_mapped_locations.mjs.map |
1 change: 1 addition & 0 deletions
1
test/fixtures/test-runner/output/source_mapped_locations.mjs.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
test/fixtures/test-runner/output/source_mapped_locations.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
TAP version 13 | ||
# Subtest: fails | ||
not ok 1 - fails | ||
--- | ||
duration_ms: * | ||
location: 'file:///test/fixtures/test-runner/output/source_mapped_locations.ts:5:1' | ||
failureType: 'testCodeFailure' | ||
error: |- | ||
Expected values to be strictly equal: | ||
|
||
1 !== 2 | ||
|
||
code: 'ERR_ASSERTION' | ||
name: 'AssertionError' | ||
expected: 2 | ||
actual: 1 | ||
operator: 'strictEqual' | ||
stack: |- | ||
* | ||
* | ||
* | ||
* | ||
* | ||
... | ||
1..1 | ||
# tests 1 | ||
# suites 0 | ||
# pass 0 | ||
# fail 1 | ||
# cancelled 0 | ||
# skipped 0 | ||
# todo 0 | ||
# duration_ms * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Flags: --enable-source-maps | ||
import { test } from 'node:test'; | ||
import { strictEqual } from 'node:assert'; | ||
|
||
test('fails', () => { | ||
strictEqual(1, 2); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters