()
| 5 | const { NodeInstance } = require('../common/inspector-helper.js'); |
| 6 | |
| 7 | async function runTests() { |
| 8 | const child = new NodeInstance(['--inspect-brk=0'], |
| 9 | `let c = 0; |
| 10 | const interval = setInterval(() => { |
| 11 | console.log(new Object()); |
| 12 | if (c++ === 10) |
| 13 | clearInterval(interval); |
| 14 | }, ${common.platformTimeout(30)});`); |
| 15 | const session = await child.connectInspectorSession(); |
| 16 | |
| 17 | await session.send({ method: 'NodeRuntime.enable' }); |
| 18 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 19 | await session.send([ |
| 20 | { method: 'Profiler.setSamplingInterval', |
| 21 | params: { interval: common.platformTimeout(300) } }, |
| 22 | { method: 'Profiler.enable' }]); |
| 23 | await session.send({ method: 'Runtime.runIfWaitingForDebugger' }); |
| 24 | await session.send({ method: 'NodeRuntime.disable' }); |
| 25 | await session.send({ method: 'Profiler.start' }); |
| 26 | while (await child.nextStderrString() !== |
| 27 | 'Waiting for the debugger to disconnect...'); |
| 28 | await session.send({ method: 'Profiler.stop' }); |
| 29 | session.disconnect(); |
| 30 | assert.strictEqual((await child.expectShutdown()).exitCode, 0); |
| 31 | } |
| 32 | |
| 33 | runTests().then(common.mustCall()); |
no test coverage detected
searching dependent graphs…