test: add more logs to test-esm-loader-hooks-inspect-wait

This provides a bit more information about where & when the child
processes crashes when it crashes / flakes in the CI.

PR-URL: https://github.com/nodejs/node/pull/60466
Refs: https://github.com/nodejs/node/issues/54346
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Joyee Cheung
2025-11-05 14:10:06 +01:00
committed by GitHub
parent 8511902b55
commit fa9918e412

View File

@@ -12,6 +12,7 @@ const { NodeInstance } = require('../common/inspector-helper.js');
async function runTest() {
const main = fixtures.path('es-module-loaders', 'register-loader.mjs');
process.env.NODE_DEBUG = 'esm,async_loader_worker';
const child = new NodeInstance(['--inspect-wait=0'], '', main);
const session = await child.connectInspectorSession();
@@ -24,7 +25,11 @@ async function runTest() {
]);
await session.send({ method: 'NodeRuntime.disable' });
await session.waitForDisconnect();
assert.strictEqual((await child.expectShutdown()).exitCode, 0);
const result = await child.expectShutdown();
assert.deepStrictEqual(result, {
exitCode: 0,
signal: null,
});
}
runTest();