Skip to content

Commit 8a87e39

Browse files
marco-ippolitoaduh95
authored andcommitted
test: remove empty lines from snapshots
PR-URL: #56358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Jacob Smith <jacob@frende.me>
1 parent 510649f commit 8a87e39

File tree

3 files changed

+5
-59
lines changed

3 files changed

+5
-59
lines changed

test/fixtures/eval/eval_messages.snapshot

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,13 @@ throw new Error("hello")
2727

2828
Error: hello
2929

30-
31-
32-
33-
34-
35-
36-
3730
Node.js *
3831
[eval]:1
3932
throw new Error("hello")
4033
^
4134

4235
Error: hello
4336

44-
45-
46-
47-
48-
49-
50-
5137
Node.js *
5238
100
5339
[eval]:1
@@ -56,13 +42,6 @@ var x = 100; y = x;
5642

5743
ReferenceError: y is not defined
5844

59-
60-
61-
62-
63-
64-
65-
6645
Node.js *
6746

6847
[eval]:1

test/fixtures/eval/stdin_messages.snapshot

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ Caused by:
1414

1515
SyntaxError: Strict mode code may not include a with statement
1616

17-
18-
19-
20-
21-
22-
23-
24-
2517
Node.js *
2618
42
2719
42
@@ -31,33 +23,13 @@ throw new Error("hello")
3123

3224
Error: hello
3325

34-
35-
36-
37-
38-
39-
40-
41-
42-
43-
4426
Node.js *
4527
[stdin]:1
4628
throw new Error("hello")
4729
^
4830

4931
Error: hello
5032

51-
52-
53-
54-
55-
56-
57-
58-
59-
60-
6133
Node.js *
6234
100
6335
[stdin]:1
@@ -66,16 +38,6 @@ let x = 100; y = x;
6638

6739
ReferenceError: y is not defined
6840

69-
70-
71-
72-
73-
74-
75-
76-
77-
78-
7941
Node.js *
8042

8143
[stdin]:1

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

Lines changed: 5 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy