Skip to content

Commit 38ad285

Browse files
committed
test: fix tests after V8 update
Adapt to changes in async stack traces and function name inference PR-URL: #25852 Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
1 parent 260d5f8 commit 38ad285

9 files changed

+19
-17
lines changed

test/message/esm_display_syntax_error.out

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ file:///*/test/message/esm_display_syntax_error.mjs:3
33
await async () => 0;
44
^^^^^
55
SyntaxError: Unexpected reserved word
6-
at translators.set (internal/modules/esm/translators.js:*:*)
6+
at internal/modules/esm/translators.js:*:*
7+
at async link (internal/modules/esm/module_job.js:*:*)

test/message/esm_display_syntax_error_import.out

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ file:///*/test/message/esm_display_syntax_error_import.mjs:6
44
^^^^^^^^
55
SyntaxError: The requested module '../fixtures/es-module-loaders/module-named-exports' does not provide an export named 'notfound'
66
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
7+
at async ModuleJob.run (internal/modules/esm/module_job.js:*:*)
8+
at async Loader.import (internal/modules/esm/loader.js:*:*)

test/message/esm_display_syntax_error_import_module.out

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ import { foo, notfound } from './module-named-exports';
44
^^^^^^^^
55
SyntaxError: The requested module './module-named-exports' does not provide an export named 'notfound'
66
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
7+
at async ModuleJob.run (internal/modules/esm/module_job.js:*:*)
8+
at async Loader.import (internal/modules/esm/loader.js:*:*)

test/message/esm_display_syntax_error_module.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ file:///*/test/fixtures/es-module-loaders/syntax-error.mjs:2
33
await async () => 0;
44
^^^^^
55
SyntaxError: Unexpected reserved word
6-
at translators.set (internal/modules/esm/translators.js:*:*)
6+
at internal/modules/esm/translators.js:*:*

test/message/events_unhandled_error_nexttick.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Error
1212
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
1313
at internal/main/run_main_module.js:*:*
1414
Emitted 'error' event at:
15-
at process.nextTick (*events_unhandled_error_nexttick.js:*:*)
15+
at *events_unhandled_error_nexttick.js:*:*
1616
at processTicksAndRejections (internal/process/task_queues.js:*:*)
1717
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:*:*)
1818
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)

test/message/stdin_messages.out

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ SyntaxError: Strict mode code may not include a with statement
1010
at Object.<anonymous> ([stdin]-wrapper:*:*)
1111
at Module._compile (internal/modules/cjs/loader.js:*:*)
1212
at evalScript (internal/process/execution.js:*:*)
13-
at readStdin (internal/main/eval_stdin.js:*:*)
14-
at Socket.process.stdin.on (internal/process/execution.js:*:*)
13+
at internal/main/eval_stdin.js:*:*
14+
at Socket.<anonymous> (internal/process/execution.js:*:*)
1515
at Socket.emit (events.js:*:*)
1616
at endReadableNT (_stream_readable.js:*:*)
1717
42
@@ -27,8 +27,8 @@ Error: hello
2727
at Object.<anonymous> ([stdin]-wrapper:*:*)
2828
at Module._compile (internal/modules/cjs/loader.js:*:*)
2929
at evalScript (internal/process/execution.js:*:*)
30-
at readStdin (internal/main/eval_stdin.js:*:*)
31-
at Socket.process.stdin.on (internal/process/execution.js:*:*)
30+
at internal/main/eval_stdin.js:*:*
31+
at Socket.<anonymous> (internal/process/execution.js:*:*)
3232
at Socket.emit (events.js:*:*)
3333
at endReadableNT (_stream_readable.js:*:*)
3434
[stdin]:1
@@ -42,8 +42,8 @@ Error: hello
4242
at Object.<anonymous> ([stdin]-wrapper:*:*)
4343
at Module._compile (internal/modules/cjs/loader.js:*:*)
4444
at evalScript (internal/process/execution.js:*:*)
45-
at readStdin (internal/main/eval_stdin.js:*:*)
46-
at Socket.process.stdin.on (internal/process/execution.js:*:*)
45+
at internal/main/eval_stdin.js:*:*
46+
at Socket.<anonymous> (internal/process/execution.js:*:*)
4747
at Socket.emit (events.js:*:*)
4848
at endReadableNT (_stream_readable.js:*:*)
4949
100
@@ -58,8 +58,8 @@ ReferenceError: y is not defined
5858
at Object.<anonymous> ([stdin]-wrapper:*:*)
5959
at Module._compile (internal/modules/cjs/loader.js:*:*)
6060
at evalScript (internal/process/execution.js:*:*)
61-
at readStdin (internal/main/eval_stdin.js:*:*)
62-
at Socket.process.stdin.on (internal/process/execution.js:*:*)
61+
at internal/main/eval_stdin.js:*:*
62+
at Socket.<anonymous> (internal/process/execution.js:*:*)
6363
at Socket.emit (events.js:*:*)
6464
at endReadableNT (_stream_readable.js:*:*)
6565

test/message/unhandled_promise_trace_warnings.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
at promiseRejectHandler (internal/process/promises.js:*)
3636
at Promise.then *
3737
at Promise.catch *
38-
at Immediate.setImmediate (*test*message*unhandled_promise_trace_warnings.js:*)
38+
at Immediate.<anonymous> (*test*message*unhandled_promise_trace_warnings.js:*)
3939
at *

test/parallel/test-performance-function.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ const {
1010

1111
{
1212
// Intentional non-op. Do not wrap in common.mustCall();
13-
const n = performance.timerify(() => {});
13+
const n = performance.timerify(function noop() {});
1414

1515
const obs = new PerformanceObserver(common.mustCall((list) => {
1616
const entries = list.getEntries();
1717
const entry = entries[0];
1818
assert(entry);
19-
assert.strictEqual(entry.name, 'performance.timerify');
19+
assert.strictEqual(entry.name, 'noop');
2020
assert.strictEqual(entry.entryType, 'function');
2121
assert.strictEqual(typeof entry.duration, 'number');
2222
assert.strictEqual(typeof entry.startTime, 'number');

test/parallel/test-repl-underscore.js

-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ function testError() {
195195
// The message from the original throw
196196
'Thrown:',
197197
'Error: baz',
198-
/setImmediate/,
199-
/^ at/,
200-
/^ at/,
201198
];
202199
for (const line of lines) {
203200
const expected = expectedLines.shift();

0 commit comments

Comments
 (0)