Skip to content

Commit 72d1f12

Browse files
marco-ippolitoaduh95
authored andcommitted
test: remove empty lines from snapshots
PR-URL: #56358 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
1 parent 0362924 commit 72d1f12

File tree

3 files changed

+5
-67
lines changed

3 files changed

+5
-67
lines changed

test/fixtures/eval/eval_messages.snapshot

-27
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ with(this){__filename}
55

66
SyntaxError: Strict mode code may not include a with statement
77

8-
9-
10-
11-
12-
13-
148
Node.js *
159
42
1610
42
@@ -20,27 +14,13 @@ throw new Error("hello")
2014

2115
Error: hello
2216

23-
24-
25-
26-
27-
28-
29-
3017
Node.js *
3118
[eval]:1
3219
throw new Error("hello")
3320
^
3421

3522
Error: hello
3623

37-
38-
39-
40-
41-
42-
43-
4424
Node.js *
4525
100
4626
[eval]:1
@@ -49,13 +29,6 @@ var x = 100; y = x;
4929

5030
ReferenceError: y is not defined
5131

52-
53-
54-
55-
56-
57-
58-
5932
Node.js *
6033

6134
[eval]:1

test/fixtures/eval/stdin_messages.snapshot

-40
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ with(this){__filename}
55

66
SyntaxError: Strict mode code may not include a with statement
77

8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
188
Node.js *
199
42
2010
42
@@ -24,33 +14,13 @@ throw new Error("hello")
2414

2515
Error: hello
2616

27-
28-
29-
30-
31-
32-
33-
34-
35-
36-
3717
Node.js *
3818
[stdin]:1
3919
throw new Error("hello")
4020
^
4121

4222
Error: hello
4323

44-
45-
46-
47-
48-
49-
50-
51-
52-
53-
5424
Node.js *
5525
100
5626
[stdin]:1
@@ -59,16 +29,6 @@ let x = 100; y = x;
5929

6030
ReferenceError: y is not defined
6131

62-
63-
64-
65-
66-
67-
68-
69-
70-
71-
7232
Node.js *
7333

7434
[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)