Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Dec 23, 2024
1 parent c291f4c commit 8d17393
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 72 deletions.
59 changes: 27 additions & 32 deletions test/fixtures/eval/eval_messages.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ with(this){__filename}
^^^^

SyntaxError: Strict mode code may not include a with statement
at new Script (node:vm:*:*)
at createScript (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [eval]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_string:*:*







Node.js *
42
Expand All @@ -21,29 +19,27 @@ throw new Error("hello")
^

Error: hello
at [eval]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [eval]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_string:*:*








Node.js *
[eval]:1
throw new Error("hello")
^

Error: hello
at [eval]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [eval]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_string:*:*








Node.js *
100
Expand All @@ -52,14 +48,13 @@ var x = 100; y = x;
^

ReferenceError: y is not defined
at [eval]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [eval]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_string:*:*








Node.js *

Expand Down
80 changes: 40 additions & 40 deletions test/fixtures/eval/stdin_messages.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ with(this){__filename}
^^^^

SyntaxError: Strict mode code may not include a with statement
at new Script (node:vm:*:*)
at createScript (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [stdin]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_stdin:*:*
at Socket.<anonymous> (node:internal/process/execution:*:*)
at Socket.emit (node:events:*:*)











Node.js *
42
Expand All @@ -23,33 +23,33 @@ throw new Error("hello")
^

Error: hello
at [stdin]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [stdin]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_stdin:*:*
at Socket.<anonymous> (node:internal/process/execution:*:*)
at Socket.emit (node:events:*:*)











Node.js *
[stdin]:1
throw new Error("hello")
^

Error: hello
at [stdin]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [stdin]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_stdin:*:*
at Socket.<anonymous> (node:internal/process/execution:*:*)
at Socket.emit (node:events:*:*)











Node.js *
100
Expand All @@ -58,16 +58,16 @@ let x = 100; y = x;
^

ReferenceError: y is not defined
at [stdin]:*:*
at Script.runInThisContext (node:vm:*:*)
at Object.runInThisContext (node:vm:*:*)
at node:internal/process/execution:*:*
at [stdin]-wrapper:*:*
at runScript (node:internal/process/execution:*:*)
at evalScript (node:internal/process/execution:*:*)
at node:internal/main/eval_stdin:*:*
at Socket.<anonymous> (node:internal/process/execution:*:*)
at Socket.emit (node:events:*:*)











Node.js *

Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-node-output-eval.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ describe('eval output', { concurrency: true }, () => {
}

const defaultTransform = snapshot.transform(
removeStackTraces,
normalize,
snapshot.replaceWindowsLineEndings,
snapshot.replaceWindowsPaths,
snapshot.replaceNodeVersion
);

function removeStackTraces(output) {
return output.replaceAll(/^ *at .+$/gm, '');
}

const tests = [
{ name: 'eval/eval_messages.js' },
{ name: 'eval/stdin_messages.js' },
Expand Down

0 comments on commit 8d17393

Please sign in to comment.