8000 test: replace diagnostics_channel stackframe in output snapshots by legendecas · Pull Request #60024 · nodejs/node · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/common/assertSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ function replaceStackTrace(str, replacement = '$1*$7$8\n') {
}

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

function replaceWindowsLineEndings(str) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
*
*
*
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
*
*
*
*
Expand Down
Loading
0