diff --git a/test/fixtures/eval/eval_messages.snapshot b/test/fixtures/eval/eval_messages.snapshot index e3976d69fd9..91ae27b4215 100644 --- a/test/fixtures/eval/eval_messages.snapshot +++ b/test/fixtures/eval/eval_messages.snapshot @@ -27,13 +27,6 @@ throw new Error("hello") Error: hello - - - - - - - Node.js * [eval]:1 throw new Error("hello") @@ -41,13 +34,6 @@ throw new Error("hello") Error: hello - - - - - - - Node.js * 100 [eval]:1 @@ -56,13 +42,6 @@ var x = 100; y = x; ReferenceError: y is not defined - - - - - - - Node.js * [eval]:1 diff --git a/test/fixtures/eval/stdin_messages.snapshot b/test/fixtures/eval/stdin_messages.snapshot index 27f5851eb94..ff8b6a05d80 100644 --- a/test/fixtures/eval/stdin_messages.snapshot +++ b/test/fixtures/eval/stdin_messages.snapshot @@ -14,14 +14,6 @@ Caused by: SyntaxError: Strict mode code may not include a with statement - - - - - - - - Node.js * 42 42 @@ -31,16 +23,6 @@ throw new Error("hello") Error: hello - - - - - - - - - - Node.js * [stdin]:1 throw new Error("hello") @@ -48,16 +30,6 @@ throw new Error("hello") Error: hello - - - - - - - - - - Node.js * 100 [stdin]:1 @@ -66,16 +38,6 @@ let x = 100; y = x; ReferenceError: y is not defined - - - - - - - - - - Node.js * [stdin]:1 diff --git a/test/parallel/test-node-output-eval.mjs b/test/parallel/test-node-output-eval.mjs index a8bfd730e92..cd22cbfea28 100644 --- a/test/parallel/test-node-output-eval.mjs +++ b/test/parallel/test-node-output-eval.mjs @@ -11,6 +11,7 @@ describe('eval output', { concurrency: true }, () => { const defaultTransform = snapshot.transform( removeStackTraces, + filterEmptyLines, normalize, snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, @@ -21,6 +22,10 @@ describe('eval output', { concurrency: true }, () => { return output.replaceAll(/^ *at .+$/gm, ''); } + function filterEmptyLines(output) { + return output.replaceAll(/^\s*$/gm, ''); + } + const tests = [ { name: 'eval/eval_messages.js' }, { name: 'eval/stdin_messages.js' },