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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: replace diagnostics_channel stackframe in output snapshots
  • Loading branch information
legendecas committed Sep 26, 2025
commit 412d7dfe1d69e76a8febb4e5b585a3d5b2e2022d
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