()
| 7 | |
| 8 | |
| 9 | async function runTests() { |
| 10 | const child = new NodeInstance(['--inspect-wait=0'], 'console.log(0);'); |
| 11 | const session = await child.connectInspectorSession(); |
| 12 | await session.send({ method: 'NodeRuntime.enable' }); |
| 13 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 14 | |
| 15 | // The execution should be paused until the debugger is attached |
| 16 | while (await child.nextStderrString() !== 'Debugger attached.'); |
| 17 | |
| 18 | await session.send({ 'method': 'Runtime.runIfWaitingForDebugger' }); |
| 19 | |
| 20 | // Wait for the execution to finish |
| 21 | while (await child.nextStderrString() !== 'Waiting for the debugger to disconnect...'); |
| 22 | |
| 23 | await session.send({ method: 'NodeRuntime.disable' }); |
| 24 | session.disconnect(); |
| 25 | assert.strictEqual((await child.expectShutdown()).exitCode, 0); |
| 26 | } |
| 27 | |
| 28 | runTests().then(common.mustCall()); |
no test coverage detected
searching dependent graphs…