Skip to content

Commit

Permalink
test: fix tests after V8 update
Browse files Browse the repository at this point in the history
Adapt to changes in async stack traces and function name inference
  • Loading branch information
targos authored and nodejs-ci committed Jan 19, 2019
1 parent bd43071 commit 47010f6
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 13 deletions.
7 changes: 6 additions & 1 deletion test/message/esm_display_syntax_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ 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:*:*)
at async addJobsToDependencyGraph (internal/modules/esm/module_job.js:*:*)
at async 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:*:*)
2 changes: 2 additions & 0 deletions test/message/esm_display_syntax_error_import.out
Original file line number Diff line number Diff line change
Expand Up @@ -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:*:*)
2 changes: 2 additions & 0 deletions test/message/esm_display_syntax_error_import_module.out
Original file line number Diff line number Diff line change
Expand Up @@ -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:*:*)
2 changes: 1 addition & 1 deletion test/message/esm_display_syntax_error_module.out
Original file line number Diff line number Diff line change
Expand Up @@ -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:*:*
2 changes: 1 addition & 1 deletion test/message/events_unhandled_error_nexttick.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Error
at executeUserCode (internal/bootstrap/node.js:*:*)
at startMainThreadExecution (internal/bootstrap/node.js:*:*)
Emitted 'error' event at:
at process.nextTick (*events_unhandled_error_nexttick.js:*:*)
at *events_unhandled_error_nexttick.js:*:*
at processTicksAndRejections (internal/process/next_tick.js:*:*)
at process.runNextTicks [as _tickCallback] (internal/process/next_tick.js:*:*)
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
Expand Down
9 changes: 5 additions & 4 deletions test/message/stdin_messages.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
[stdin]:1
with(this){__filename}
^^^^

SyntaxError: Strict mode code may not include a with statement
at new Script (vm.js:*)
at createScript (vm.js:*)
at Object.runInThisContext (vm.js:*)
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (internal/modules/cjs/loader.js:*:*)
at evalScript (internal/process/execution.js:*:*)
at Socket.process.stdin.on (internal/bootstrap/node.js:*:*)
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
at processTicksAndRejections (internal/process/next_tick.js:*:*)
Expand All @@ -26,7 +27,7 @@ Error: hello
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (internal/modules/cjs/loader.js:*:*)
at evalScript (internal/process/execution.js:*:*)
at Socket.process.stdin.on (internal/bootstrap/node.js:*:*)
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
at processTicksAndRejections (internal/process/next_tick.js:*:*)
Expand All @@ -41,7 +42,7 @@ Error: hello
at Object.<anonymous> ([stdin]-wrapper:*:*)
at Module._compile (internal/modules/cjs/loader.js:*:*)
at evalScript (internal/process/execution.js:*:*)
at Socket.process.stdin.on (internal/bootstrap/node.js:*:*)
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
at processTicksAndRejections (internal/process/next_tick.js:*:*)
Expand All @@ -57,7 +58,7 @@ 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 Socket.process.stdin.on (internal/bootstrap/node.js:*:*)
at Socket.<anonymous> (internal/bootstrap/node.js:*:*)
at Socket.emit (events.js:*:*)
at endReadableNT (_stream_readable.js:*:*)
at processTicksAndRejections (internal/process/next_tick.js:*:*)
Expand Down
2 changes: 1 addition & 1 deletion test/message/unhandled_promise_trace_warnings.out
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,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 *
4 changes: 2 additions & 2 deletions test/parallel/test-performance-function.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 0 additions & 3 deletions test/parallel/test-repl-underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 47010f6

Please sign in to comment.