-
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: migrate message source map tests from Python to JS
Migrate the remaining source map tests in the `test/message` folder from Python to JS. Fixes: #47707 test: migrate message source map tests from Python to JS PR-URL: #49238 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
- Loading branch information
1 parent
1df56e6
commit 48e4156
Showing
20 changed files
with
65 additions
and
55 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
test/fixtures/source-map/output/source_map_enclosing_function.js
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 | ||
|
||
'use strict'; | ||
require('../../../common'); | ||
Error.stackTraceLimit = 5; | ||
|
||
require('../enclosing-call-site-min.js'); |
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
4 changes: 2 additions & 2 deletions
4
...essage/source_map_reference_error_tabs.js → ...output/source_map_reference_error_tabs.js
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Flags: --enable-source-maps | ||
|
||
'use strict'; | ||
require('../common'); | ||
require('../../../common'); | ||
Error.stackTraceLimit = 2; | ||
|
||
require('../fixtures/source-map/tabs.js'); | ||
require('../tabs.js'); |
10 changes: 10 additions & 0 deletions
10
test/fixtures/source-map/output/source_map_reference_error_tabs.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,10 @@ | ||
*tabs.coffee:26 | ||
alert "I knew it!" | ||
^ | ||
|
||
|
||
ReferenceError: alert is not defined | ||
at Object.<anonymous> (*tabs.coffee:26:2) | ||
at Object.<anonymous> (*tabs.coffee:1:14) | ||
|
||
Node.js * |
4 changes: 2 additions & 2 deletions
4
...ge/source_map_sourcemapping_url_string.js → ...ut/source_map_sourcemapping_url_string.js
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
3 changes: 3 additions & 0 deletions
3
test/fixtures/source-map/output/source_map_sourcemapping_url_string.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,3 @@ | ||
Error: an exception. | ||
at Object.<anonymous> (*typescript-sourcemapping_url_string.ts:3:7) | ||
at Module._compile (node:internal*modules*cjs*loader:1241:14) |
4 changes: 2 additions & 2 deletions
4
test/message/source_map_throw_catch.js → ...urce-map/output/source_map_throw_catch.js
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
4 changes: 4 additions & 0 deletions
4
test/fixtures/source-map/output/source_map_throw_catch.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,4 @@ | ||
reachable | ||
Error: an exception | ||
at branch (*typescript-throw.ts:18:11) | ||
at Object.<anonymous> (*typescript-throw.ts:24:1) |
4 changes: 2 additions & 2 deletions
4
test/message/source_map_throw_icu.js → ...source-map/output/source_map_throw_icu.js
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Flags: --enable-source-maps | ||
|
||
'use strict'; | ||
require('../common'); | ||
require('../../../common'); | ||
Error.stackTraceLimit = 2; | ||
|
||
require('../fixtures/source-map/icu'); | ||
require('../icu'); |
10 changes: 10 additions & 0 deletions
10
test/fixtures/source-map/output/source_map_throw_icu.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,10 @@ | ||
*icu.jsx:3 | ||
("あ 🐕 🐕", throw Error("an error")); | ||
^ | ||
|
||
|
||
Error: an error | ||
at Object.createElement (*icu.jsx:3:23) | ||
at Object.<anonymous> (*icu.jsx:9:5) | ||
|
||
Node.js * |
5 changes: 5 additions & 0 deletions
5
test/fixtures/source-map/output/source_map_throw_set_immediate.js
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,5 @@ | ||
// Flags: --enable-source-maps | ||
|
||
'use strict'; | ||
require('../../../common'); | ||
require('../uglify-throw'); |
11 changes: 11 additions & 0 deletions
11
test/fixtures/source-map/output/source_map_throw_set_immediate.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,11 @@ | ||
*uglify-throw-original.js:5 | ||
throw Error('goodbye'); | ||
^ | ||
|
||
|
||
Error: goodbye | ||
at Hello (*uglify-throw-original.js:5:9) | ||
at Immediate.<anonymous> (*uglify-throw-original.js:9:3) | ||
at process.processImmediate (node:internal*timers:478:21) | ||
|
||
Node.js * |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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