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

Function runTest

test/parallel/test-inspector-multisession-ws.js:63–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63async function runTest() {
64 const child = new NodeInstance(undefined, script);
65
66 const [session1, session2] =
67 await Promise.all([setupSession(child), setupSession(child)]);
68 await Promise.all([
69 session1.send({ method: 'Runtime.runIfWaitingForDebugger' }),
70 session2.send({ method: 'Runtime.runIfWaitingForDebugger' }),
71 ]);
72 await Promise.all([
73 session1.send({ method: 'NodeRuntime.disable' }),
74 session2.send({ method: 'NodeRuntime.disable' }),
75 ]);
76 await testSuspend(session2, session1);
77 console.log('[test]', 'Should shut down after both sessions disconnect');
78
79 await session1.runToCompletion();
80 await session2.send({ 'method': 'Debugger.disable' });
81 await session2.disconnect();
82 return child.expectShutdown();
83}
84
85runTest().then(common.mustCall());

Calls 8

expectShutdownMethod · 0.95
setupSessionFunction · 0.85
testSuspendFunction · 0.85
allMethod · 0.80
runToCompletionMethod · 0.80
sendMethod · 0.65
disconnectMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…