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

Function testSuspend

test/parallel/test-inspector-multisession-ws.js:46–61  ·  view source on GitHub ↗
(sessionA, sessionB)

Source from the content-addressed store, hash-verified

44}
45
46async function testSuspend(sessionA, sessionB) {
47 console.log('[test]', 'Breaking in code and verifying events are fired');
48 await Promise.all([
49 sessionA.waitForNotification('Debugger.paused', 'Initial sessionA paused'),
50 sessionB.waitForNotification('Debugger.paused', 'Initial sessionB paused'),
51 ]);
52 sessionA.send({ 'method': 'Debugger.resume' });
53
54 await sessionA.waitForNotification('Runtime.consoleAPICalled',
55 'Console output');
56 sessionA.send({ 'method': 'Debugger.pause' });
57 return Promise.all([
58 sessionA.waitForNotification('Debugger.paused', 'SessionA paused'),
59 sessionB.waitForNotification('Debugger.paused', 'SessionB paused'),
60 ]);
61}
62
63async function runTest() {
64 const child = new NodeInstance(undefined, script);

Callers 1

runTestFunction · 0.85

Calls 4

allMethod · 0.80
waitForNotificationMethod · 0.80
sendMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…