MCPcopy Index your code
hub / github.com/nodejs/node / runTest

Function runTest

test/parallel/test-esm-loader-hooks-inspect-wait.js:13–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const { NodeInstance } = require('../common/inspector-helper.js');
12
13async function runTest() {
14 const main = fixtures.path('es-module-loaders', 'register-loader.mjs');
15 process.env.NODE_DEBUG = 'esm,async_loader_worker';
16 const child = new NodeInstance(['--inspect-wait=0'], '', main);
17
18 const session = await child.connectInspectorSession();
19 await session.send({ method: 'NodeRuntime.enable' });
20 await session.waitForNotification('NodeRuntime.waitingForDebugger');
21 await session.send([
22 { 'method': 'Runtime.enable' },
23 { 'method': 'Debugger.enable' },
24 { 'method': 'Runtime.runIfWaitingForDebugger' },
25 ]);
26 await session.send({ method: 'NodeRuntime.disable' });
27 await session.waitForDisconnect();
28 const result = await child.expectShutdown();
29 assert.deepStrictEqual(result, {
30 exitCode: 0,
31 signal: null,
32 });
33}
34
35runTest();

Calls 6

expectShutdownMethod · 0.95
waitForNotificationMethod · 0.80
waitForDisconnectMethod · 0.80
sendMethod · 0.65
pathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…