%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const { strictEqual } = require('assert'); const { NodeInstance } = require('../common/inspector-helper.js'); async function testNoServerNoCrash() { console.log('Test there\'s no crash stopping server that was not started'); const instance = new NodeInstance([], `process._debugEnd(); process.exit(42);`); strictEqual((await instance.expectShutdown()).exitCode, 42); } async function testNoSessionNoCrash() { console.log('Test there\'s no crash stopping server without connecting'); const instance = new NodeInstance('--inspect=0', 'process._debugEnd();process.exit(42);'); strictEqual((await instance.expectShutdown()).exitCode, 42); } async function testSessionNoCrash() { console.log('Test there\'s no crash stopping server after connecting'); const script = `process._debugEnd(); process._debugProcess(process.pid); setTimeout(() => { console.log("Done"); process.exit(42); });`; const instance = new NodeInstance('--inspect-brk=0', script); const session = await instance.connectInspectorSession(); await session.send({ 'method': 'Runtime.runIfWaitingForDebugger' }); await session.waitForServerDisconnect(); strictEqual((await instance.expectShutdown()).exitCode, 42); } async function runTest() { await testNoServerNoCrash(); await testNoSessionNoCrash(); await testSessionNoCrash(); } runTest().then(common.mustCall());