()
| 8 | const { NodeInstance } = require('../common/inspector-helper.js'); |
| 9 | |
| 10 | async function runTest() { |
| 11 | const child = new NodeInstance(['--inspect-brk-node=0', '-p', '42']); |
| 12 | const session = await child.connectInspectorSession(); |
| 13 | await session.send({ method: 'NodeRuntime.enable' }); |
| 14 | await session.waitForNotification('NodeRuntime.waitingForDebugger'); |
| 15 | await session.send({ method: 'Runtime.enable' }); |
| 16 | await session.send({ method: 'Debugger.enable' }); |
| 17 | await session.send({ method: 'Runtime.runIfWaitingForDebugger' }); |
| 18 | await session.send({ method: 'NodeRuntime.disable' }); |
| 19 | await session.waitForNotification((notification) => { |
| 20 | // The main assertion here is that we do hit the loader script first. |
| 21 | return notification.method === 'Debugger.scriptParsed' && |
| 22 | notification.params.url === 'node:internal/bootstrap/realm'; |
| 23 | }); |
| 24 | |
| 25 | await session.waitForNotification('Debugger.paused'); |
| 26 | await session.send({ method: 'Debugger.resume' }); |
| 27 | await session.waitForNotification('Debugger.paused'); |
| 28 | await session.runToCompletion(); |
| 29 | } |
| 30 | |
| 31 | runTest().then(common.mustCall()); |
no test coverage detected
searching dependent graphs…