fix: improve ERR_AMBIGUOUS_MODULE_SYNTAX error message #70385
Annotations
3 errors and 1 notice
|
test-macOS
Process completed with exit code 2.
|
|
test-macOS:
test/es-module/test-esm-detect-ambiguous.mjs#L460
--- stdout ---
Test failure: 'should throw an ambiguous syntax error when using top-level await with module'
Location: test/es-module/test-esm-detect-ambiguous.mjs:450:3
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./. Input:
''
at TestContext.<anonymous> (file:///Users/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs:460:12)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async Test.run (node:internal/test_runner/test:1102:7)
at async Suite.processPendingSubtests (node:internal/test_runner/test:777:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '',
expected: /ReferenceError: Cannot determine intended module format because both module and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace module with import\./,
operator: 'match',
diff: 'simple'
}
Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /Users/runner/work/node/node/node/test/es-module/test-esm-detect-ambiguous.mjs
|
|
test-macOS:
test/parallel/test-debugger-restart-message.js#L28
--- stderr ---
/Users/runner/work/node/node/node/test/common/debugger.js:92
const timeoutErr = new Error(`Timeout (${TIMEOUT}) while waiting for ${pattern}`);
^
Error: Timeout (15000) while waiting for /(?:assert|break|break on start|debugCommand|exception|other|promiseRejection|step) in/i
at /Users/runner/work/node/node/node/test/common/debugger.js:92:28
at new Promise (<anonymous>)
at Object.waitFor (/Users/runner/work/node/node/node/test/common/debugger.js:67:14)
at Object.stepCommand (/Users/runner/work/node/node/node/test/common/debugger.js:178:10)
at onWaitForInitialBreak (/Users/runner/work/node/node/node/test/parallel/test-debugger-restart-message.js:28:19)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5) {
output: '< Debugger ending on ws://127.0.0.1:55561/f8cb0020-5cf4-4dbf-b28a-4f3b13c7bc8f\n' +
'< For help, see: https://nodejs.org/en/docs/inspector\n' +
'< \n' +
'debug> \n' +
'< Debugger listening on ws://127.0.0.1:55567/6dd80233-0f17-4f7a-acf3-2ca87aff9e70\n' +
'< For help, see: https://nodejs.org/en/docs/inspector\n' +
'< \n' +
'debug> \n' +
'connecting to 127.0.0.1:55567 ...\n' +
'< Debugger attached.\n' +
'< \n' +
'debug> \n' +
' ok\n' +
'\n' +
'debug> '
}
Node.js v26.0.0-pre
Command: out/Release/node /Users/runner/work/node/node/node/test/parallel/test-debugger-restart-message.js
|
|
sccache stats
0% - 0 hits, 0 misses, 0 errors
|