()
| 20 | } |
| 21 | |
| 22 | async function testSessionNoCrash() { |
| 23 | console.log('Test there\'s no crash stopping server after connecting'); |
| 24 | const script = `process._debugEnd(); |
| 25 | process._debugProcess(process.pid); |
| 26 | setTimeout(() => { |
| 27 | console.log("Done"); |
| 28 | process.exit(42); |
| 29 | });`; |
| 30 | |
| 31 | const instance = new NodeInstance('--inspect-brk=0', script); |
| 32 | const session = await instance.connectInspectorSession(); |
| 33 | await session.send({ method: 'NodeRuntime.enable' }); |
| 34 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 35 | await session.send({ 'method': 'Runtime.runIfWaitingForDebugger' }); |
| 36 | await session.waitForServerDisconnect(); |
| 37 | assert.strictEqual((await instance.expectShutdown()).exitCode, 42); |
| 38 | } |
| 39 | |
| 40 | async function runTest() { |
| 41 | await testNoServerNoCrash(); |
no test coverage detected
searching dependent graphs…