()
| 270 | } |
| 271 | |
| 272 | private async disposeChild(): Promise<void> { |
| 273 | this.started = undefined |
| 274 | if (this.child) { |
| 275 | const child = this.child |
| 276 | child.removeAllListeners() |
| 277 | child.kill() |
| 278 | // Wait for the child to exit otherwise its output will be lost which can |
| 279 | // be especially problematic if you're trying to debug why cleanup failed. |
| 280 | await new Promise((r) => child!.on("exit", r)) |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | private async relaunch(): Promise<void> { |
| 285 | this.disposeChild() |
no outgoing calls
no test coverage detected