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

Function runTest

test/parallel/test-esm-loader-hooks-inspect-brk.js:13–29  ·  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 const child = new NodeInstance(['--inspect-brk=0'], '', main);
16
17 const session = await child.connectInspectorSession();
18 await session.send({ method: 'NodeRuntime.enable' });
19 await session.waitForNotification('NodeRuntime.waitingForDebugger');
20 await session.send([
21 { 'method': 'Runtime.enable' },
22 { 'method': 'Debugger.enable' },
23 { 'method': 'Runtime.runIfWaitingForDebugger' },
24 ]);
25 await session.send({ method: 'NodeRuntime.disable' });
26 await session.waitForNotification('Debugger.paused');
27 await session.runToCompletion();
28 assert.strictEqual((await child.expectShutdown()).exitCode, 0);
29}
30
31runTest();

Calls 6

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

Tested by

no test coverage detected