()
| 441 | }; |
| 442 | |
| 443 | const cleanup = () => { |
| 444 | child.stdout.removeListener('data', onData); |
| 445 | child.stderr.removeListener('data', onStderr); |
| 446 | child.removeListener('error', onError); |
| 447 | child.removeListener('close', onClose); |
| 448 | if (child.connected) { |
| 449 | child.disconnect(); |
| 450 | } |
| 451 | }; |
| 452 | |
| 453 | child.stdout.on('data', onData); |
| 454 | child.stderr.on('data', onStderr); |
no test coverage detected