Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f15128d

Browse files
committedFeb 4, 2025
test: remove empty lines from snapshots
PR-URL: nodejs#56358 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
1 parent 3eaf705 commit f15128d

File tree

3 files changed

+5
-59
lines changed

3 files changed

+5
-59
lines changed
 

‎test/fixtures/eval/eval_messages.snapshot

-21
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,13 @@ throw new Error("hello")
2121

2222
Error: hello
2323

24-
25-
26-
27-
28-
29-
30-
3124
Node.js *
3225
[eval]:1
3326
throw new Error("hello")
3427
^
3528

3629
Error: hello
3730

38-
39-
40-
41-
42-
43-
44-
4531
Node.js *
4632
100
4733
[eval]:1
@@ -50,13 +36,6 @@ var x = 100; y = x;
5036

5137
ReferenceError: y is not defined
5238

53-
54-
55-
56-
57-
58-
59-
6039
Node.js *
6140

6241
[eval]:1

‎test/fixtures/eval/stdin_messages.snapshot

-38
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ with(this){__filename}
1111

1212
SyntaxError: Strict mode code may not include a with statement
1313

14-
15-
16-
17-
18-
19-
20-
21-
2214
Node.js *
2315
42
2416
42
@@ -28,33 +20,13 @@ throw new Error("hello")
2820

2921
Error: hello
3022

31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
4123
Node.js *
4224
[stdin]:1
4325
throw new Error("hello")
4426
^
4527

4628
Error: hello
4729

48-
49-
50-
51-
52-
53-
54-
55-
56-
57-
5830
Node.js *
5931
100
6032
[stdin]:1
@@ -63,16 +35,6 @@ let x = 100; y = x;
6335

6436
ReferenceError: y is not defined
6537

66-
67-
68-
69-
70-
71-
72-
73-
74-
75-
7638
Node.js *
7739

7840
[stdin]:1

‎test/parallel/test-node-output-eval.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe('eval output', { concurrency: true }, () => {
1111

1212
const defaultTransform = snapshot.transform(
1313
removeStackTraces,
14+
filterEmptyLines,
1415
normalize,
1516
snapshot.replaceWindowsLineEndings,
1617
snapshot.replaceWindowsPaths,
@@ -21,6 +22,10 @@ describe('eval output', { concurrency: true }, () => {
2122
return output.replaceAll(/^ *at .+$/gm, '');
2223
}
2324

25+
function filterEmptyLines(output) {
26+
return output.replaceAll(/^\s*$/gm, '');
27+
}
28+
2429
const tests = [
2530
{ name: 'eval/eval_messages.js' },
2631
{ name: 'eval/stdin_messages.js' },

0 commit comments

Comments
 (0)
Please sign in to comment.