mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user