()
| 61 | } |
| 62 | |
| 63 | async 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 | |
| 85 | runTest().then(common.mustCall()); |
no test coverage detected
searching dependent graphs…