mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: remove empty lines from snapshots
PR-URL: https://github.com/nodejs/node/pull/56358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Jacob Smith <jacob@frende.me>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
d2af881997
commit
0e04aea54f
21
test/fixtures/eval/eval_messages.snapshot
vendored
21
test/fixtures/eval/eval_messages.snapshot
vendored
@@ -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
|
||||
|
||||
38
test/fixtures/eval/stdin_messages.snapshot
vendored
38
test/fixtures/eval/stdin_messages.snapshot
vendored
@@ -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
|
||||
|
||||
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user