Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4b95a5

Browse filesBrowse files
legendecasaduh95
authored andcommitted
test: replace diagnostics_channel stackframe in output snapshots
PR-URL: #60024 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 609c063 commit e4b95a5
Copy full SHA for e4b95a5

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎test/common/assertSnapshot.js‎

Copy file name to clipboardExpand all lines: test/common/assertSnapshot.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ function replaceStackTrace(str, replacement = '$1*$7$8\n') {
1717
}
1818

1919
function replaceInternalStackTrace(str) {
20-
return str.replaceAll(/(\W+).*node:internal.*/g, '$1*');
20+
// Replace non-internal frame `at TracingChannel.traceSync (node:diagnostics_channel:328:14)`
21+
// as well as `at node:internal/main/run_main_module:33:47` with `*`.
22+
return str.replaceAll(/(\W+).*[(\s]node:.*/g, '$1*');
2123
}
2224

2325
function replaceWindowsLineEndings(str) {
Collapse file

‎test/fixtures/source-map/output/source_map_assert_source_line.snapshot‎

Copy file name to clipboardExpand all lines: test/fixtures/source-map/output/source_map_assert_source_line.snapshot
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
77
*
88
*
99
*
10-
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
10+
*
1111
*
1212
*
1313
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.