test: fix tests after V8 update
Adapt to changes in async stack traces and function name inference PR-URL: https://github.com/nodejs/node/pull/25852 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
parent
260d5f8c3b
commit
38ad285a2e
@ -3,4 +3,5 @@ file:///*/test/message/esm_display_syntax_error.mjs:3
|
||||
await async () => 0;
|
||||
^^^^^
|
||||
SyntaxError: Unexpected reserved word
|
||||
at translators.set (internal/modules/esm/translators.js:*:*)
|
||||
at internal/modules/esm/translators.js:*:*
|
||||
at async link (internal/modules/esm/module_job.js:*:*)
|
||||
|
@ -4,3 +4,5 @@ file:///*/test/message/esm_display_syntax_error_import.mjs:6
|
||||
^^^^^^^^
|
||||
SyntaxError: The requested module '../fixtures/es-module-loaders/module-named-exports' does not provide an export named 'notfound'
|
||||
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
|
||||
at async ModuleJob.run (internal/modules/esm/module_job.js:*:*)
|
||||
at async Loader.import (internal/modules/esm/loader.js:*:*)
|
||||
|
@ -4,3 +4,5 @@ import { foo, notfound } from './module-named-exports';
|
||||
^^^^^^^^
|
||||
SyntaxError: The requested module './module-named-exports' does not provide an export named 'notfound'
|
||||
at ModuleJob._instantiate (internal/modules/esm/module_job.js:*:*)
|
||||
at async ModuleJob.run (internal/modules/esm/module_job.js:*:*)
|
||||
at async Loader.import (internal/modules/esm/loader.js:*:*)
|
||||
|
@ -3,4 +3,4 @@ file:///*/test/fixtures/es-module-loaders/syntax-error.mjs:2
|
||||
await async () => 0;
|
||||
^^^^^
|
||||
SyntaxError: Unexpected reserved word
|
||||
at translators.set (internal/modules/esm/translators.js:*:*)
|
||||
at internal/modules/esm/translators.js:*:*
|
||||
|
@ -12,7 +12,7 @@ Error
|
||||
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
|
||||
at internal/main/run_main_module.js:*:*
|
||||
Emitted 'error' event at:
|
||||
at process.nextTick (*events_unhandled_error_nexttick.js:*:*)
|
||||
at *events_unhandled_error_nexttick.js:*:*
|
||||
at processTicksAndRejections (internal/process/task_queues.js:*:*)
|
||||
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:*:*)
|
||||
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
|
||||
|
@ -10,8 +10,8 @@ SyntaxError: Strict mode code may not include a with statement
|
||||
at Object.<anonymous> ([stdin]-wrapper:*:*)
|
||||
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
||||
at evalScript (internal/process/execution.js:*:*)
|
||||
at readStdin (internal/main/eval_stdin.js:*:*)
|
||||
at Socket.process.stdin.on (internal/process/execution.js:*:*)
|
||||
at internal/main/eval_stdin.js:*:*
|
||||
at Socket.<anonymous> (internal/process/execution.js:*:*)
|
||||
at Socket.emit (events.js:*:*)
|
||||
at endReadableNT (_stream_readable.js:*:*)
|
||||
42
|
||||
@ -27,8 +27,8 @@ Error: hello
|
||||
at Object.<anonymous> ([stdin]-wrapper:*:*)
|
||||
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
||||
at evalScript (internal/process/execution.js:*:*)
|
||||
at readStdin (internal/main/eval_stdin.js:*:*)
|
||||
at Socket.process.stdin.on (internal/process/execution.js:*:*)
|
||||
at internal/main/eval_stdin.js:*:*
|
||||
at Socket.<anonymous> (internal/process/execution.js:*:*)
|
||||
at Socket.emit (events.js:*:*)
|
||||
at endReadableNT (_stream_readable.js:*:*)
|
||||
[stdin]:1
|
||||
@ -42,8 +42,8 @@ Error: hello
|
||||
at Object.<anonymous> ([stdin]-wrapper:*:*)
|
||||
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
||||
at evalScript (internal/process/execution.js:*:*)
|
||||
at readStdin (internal/main/eval_stdin.js:*:*)
|
||||
at Socket.process.stdin.on (internal/process/execution.js:*:*)
|
||||
at internal/main/eval_stdin.js:*:*
|
||||
at Socket.<anonymous> (internal/process/execution.js:*:*)
|
||||
at Socket.emit (events.js:*:*)
|
||||
at endReadableNT (_stream_readable.js:*:*)
|
||||
100
|
||||
@ -58,8 +58,8 @@ ReferenceError: y is not defined
|
||||
at Object.<anonymous> ([stdin]-wrapper:*:*)
|
||||
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
||||
at evalScript (internal/process/execution.js:*:*)
|
||||
at readStdin (internal/main/eval_stdin.js:*:*)
|
||||
at Socket.process.stdin.on (internal/process/execution.js:*:*)
|
||||
at internal/main/eval_stdin.js:*:*
|
||||
at Socket.<anonymous> (internal/process/execution.js:*:*)
|
||||
at Socket.emit (events.js:*:*)
|
||||
at endReadableNT (_stream_readable.js:*:*)
|
||||
|
||||
|
@ -35,5 +35,5 @@
|
||||
at promiseRejectHandler (internal/process/promises.js:*)
|
||||
at Promise.then *
|
||||
at Promise.catch *
|
||||
at Immediate.setImmediate (*test*message*unhandled_promise_trace_warnings.js:*)
|
||||
at Immediate.<anonymous> (*test*message*unhandled_promise_trace_warnings.js:*)
|
||||
at *
|
||||
|
@ -10,13 +10,13 @@ const {
|
||||
|
||||
{
|
||||
// Intentional non-op. Do not wrap in common.mustCall();
|
||||
const n = performance.timerify(() => {});
|
||||
const n = performance.timerify(function noop() {});
|
||||
|
||||
const obs = new PerformanceObserver(common.mustCall((list) => {
|
||||
const entries = list.getEntries();
|
||||
const entry = entries[0];
|
||||
assert(entry);
|
||||
assert.strictEqual(entry.name, 'performance.timerify');
|
||||
assert.strictEqual(entry.name, 'noop');
|
||||
assert.strictEqual(entry.entryType, 'function');
|
||||
assert.strictEqual(typeof entry.duration, 'number');
|
||||
assert.strictEqual(typeof entry.startTime, 'number');
|
||||
|
@ -195,9 +195,6 @@ function testError() {
|
||||
// The message from the original throw
|
||||
'Thrown:',
|
||||
'Error: baz',
|
||||
/setImmediate/,
|
||||
/^ at/,
|
||||
/^ at/,
|
||||
];
|
||||
for (const line of lines) {
|
||||
const expected = expectedLines.shift();
|
||||
|
Loading…
x
Reference in New Issue
Block a user