Skip to content

Commit 8d17393

Browse files
fixup
1 parent c291f4c commit 8d17393

File tree

3 files changed

+72
-72
lines changed

3 files changed

+72
-72
lines changed

test/fixtures/eval/eval_messages.snapshot

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ with(this){__filename}
44
^^^^
55

66
SyntaxError: Strict mode code may not include a with statement
7-
at new Script (node:vm:*:*)
8-
at createScript (node:vm:*:*)
9-
at Object.runInThisContext (node:vm:*:*)
10-
at node:internal/process/execution:*:*
11-
at [eval]-wrapper:*:*
12-
at runScript (node:internal/process/execution:*:*)
13-
at evalScript (node:internal/process/execution:*:*)
14-
at node:internal/main/eval_string:*:*
7+
8+
9+
10+
11+
12+
1513

1614
Node.js *
1715
42
@@ -21,29 +19,27 @@ throw new Error("hello")
2119
^
2220

2321
Error: hello
24-
at [eval]:*:*
25-
at Script.runInThisContext (node:vm:*:*)
26-
at Object.runInThisContext (node:vm:*:*)
27-
at node:internal/process/execution:*:*
28-
at [eval]-wrapper:*:*
29-
at runScript (node:internal/process/execution:*:*)
30-
at evalScript (node:internal/process/execution:*:*)
31-
at node:internal/main/eval_string:*:*
22+
23+
24+
25+
26+
27+
28+
3229

3330
Node.js *
3431
[eval]:1
3532
throw new Error("hello")
3633
^
3734

3835
Error: hello
39-
at [eval]:*:*
40-
at Script.runInThisContext (node:vm:*:*)
41-
at Object.runInThisContext (node:vm:*:*)
42-
at node:internal/process/execution:*:*
43-
at [eval]-wrapper:*:*
44-
at runScript (node:internal/process/execution:*:*)
45-
at evalScript (node:internal/process/execution:*:*)
46-
at node:internal/main/eval_string:*:*
36+
37+
38+
39+
40+
41+
42+
4743

4844
Node.js *
4945
100
@@ -52,14 +48,13 @@ var x = 100; y = x;
5248
^
5349

5450
ReferenceError: y is not defined
55-
at [eval]:*:*
56-
at Script.runInThisContext (node:vm:*:*)
57-
at Object.runInThisContext (node:vm:*:*)
58-
at node:internal/process/execution:*:*
59-
at [eval]-wrapper:*:*
60-
at runScript (node:internal/process/execution:*:*)
61-
at evalScript (node:internal/process/execution:*:*)
62-
at node:internal/main/eval_string:*:*
51+
52+
53+
54+
55+
56+
57+
6358

6459
Node.js *
6560

test/fixtures/eval/stdin_messages.snapshot

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ with(this){__filename}
44
^^^^
55

66
SyntaxError: Strict mode code may not include a with statement
7-
at new Script (node:vm:*:*)
8-
at createScript (node:vm:*:*)
9-
at Object.runInThisContext (node:vm:*:*)
10-
at node:internal/process/execution:*:*
11-
at [stdin]-wrapper:*:*
12-
at runScript (node:internal/process/execution:*:*)
13-
at evalScript (node:internal/process/execution:*:*)
14-
at node:internal/main/eval_stdin:*:*
15-
at Socket.<anonymous> (node:internal/process/execution:*:*)
16-
at Socket.emit (node:events:*:*)
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
1717

1818
Node.js *
1919
42
@@ -23,33 +23,33 @@ throw new Error("hello")
2323
^
2424

2525
Error: hello
26-
at [stdin]:*:*
27-
at Script.runInThisContext (node:vm:*:*)
28-
at Object.runInThisContext (node:vm:*:*)
29-
at node:internal/process/execution:*:*
30-
at [stdin]-wrapper:*:*
31-
at runScript (node:internal/process/execution:*:*)
32-
at evalScript (node:internal/process/execution:*:*)
33-
at node:internal/main/eval_stdin:*:*
34-
at Socket.<anonymous> (node:internal/process/execution:*:*)
35-
at Socket.emit (node:events:*:*)
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
3636

3737
Node.js *
3838
[stdin]:1
3939
throw new Error("hello")
4040
^
4141

4242
Error: hello
43-
at [stdin]:*:*
44-
at Script.runInThisContext (node:vm:*:*)
45-
at Object.runInThisContext (node:vm:*:*)
46-
at node:internal/process/execution:*:*
47-
at [stdin]-wrapper:*:*
48-
at runScript (node:internal/process/execution:*:*)
49-
at evalScript (node:internal/process/execution:*:*)
50-
at node:internal/main/eval_stdin:*:*
51-
at Socket.<anonymous> (node:internal/process/execution:*:*)
52-
at Socket.emit (node:events:*:*)
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
5353

5454
Node.js *
5555
100
@@ -58,16 +58,16 @@ let x = 100; y = x;
5858
^
5959

6060
ReferenceError: y is not defined
61-
at [stdin]:*:*
62-
at Script.runInThisContext (node:vm:*:*)
63-
at Object.runInThisContext (node:vm:*:*)
64-
at node:internal/process/execution:*:*
65-
at [stdin]-wrapper:*:*
66-
at runScript (node:internal/process/execution:*:*)
67-
at evalScript (node:internal/process/execution:*:*)
68-
at node:internal/main/eval_stdin:*:*
69-
at Socket.<anonymous> (node:internal/process/execution:*:*)
70-
at Socket.emit (node:events:*:*)
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+
7171

7272
Node.js *
7373

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ describe('eval output', { concurrency: true }, () => {
1010
}
1111

1212
const defaultTransform = snapshot.transform(
13+
removeStackTraces,
1314
normalize,
1415
snapshot.replaceWindowsLineEndings,
1516
snapshot.replaceWindowsPaths,
1617
snapshot.replaceNodeVersion
1718
);
1819

20+
function removeStackTraces(output) {
21+
return output.replaceAll(/^ *at .+$/gm, '');
22+
}
23+
1924
const tests = [
2025
{ name: 'eval/eval_messages.js' },
2126
{ name: 'eval/stdin_messages.js' },

0 commit comments

Comments
 (0)