(file, instance)
| 26 | |
| 27 | // Triggers a single restart and resolves when the restarted child prints "safe to debug now". |
| 28 | function restartAndWaitForReady(file, instance) { |
| 29 | const ready = new Promise((resolve) => { |
| 30 | instance.on('stdout', (data) => { |
| 31 | if (data?.includes('safe to debug now')) { |
| 32 | resolve(); |
| 33 | } |
| 34 | }); |
| 35 | }); |
| 36 | writeFileSync(file, readFileSync(file)); |
| 37 | return ready; |
| 38 | } |
| 39 | |
| 40 | |
| 41 | describe('watch mode - inspect', () => { |
no test coverage detected