()
| 19 | const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts); |
| 20 | |
| 21 | async function waitInitialBreak() { |
| 22 | try { |
| 23 | await cli.waitForInitialBreak(); |
| 24 | await cli.waitForPrompt(); |
| 25 | await cli.command('takeHeapSnapshot()'); |
| 26 | JSON.parse(readFileSync(filename, 'utf8')); |
| 27 | // Check that two simultaneous snapshots don't step all over each other. |
| 28 | // Refs: https://github.com/nodejs/node/issues/39555 |
| 29 | await cli.command('takeHeapSnapshot(); takeHeapSnapshot()'); |
| 30 | JSON.parse(readFileSync(filename, 'utf8')); |
| 31 | } finally { |
| 32 | await cli.quit(); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // Check that the snapshot is valid JSON. |
| 37 | waitInitialBreak().then(common.mustCall()); |
no test coverage detected
searching dependent graphs…