()
| 299 | } |
| 300 | |
| 301 | export function stopServer(): void { |
| 302 | if (serverProcess?.pid) { |
| 303 | try { |
| 304 | process.kill(-serverProcess.pid, "SIGTERM"); |
| 305 | } catch { |
| 306 | /* already dead */ |
| 307 | } |
| 308 | serverProcess = undefined; |
| 309 | } |
| 310 | if (tempDir && fs.existsSync(tempDir)) { |
| 311 | fs.rmSync(tempDir, { recursive: true, force: true }); |
| 312 | } |
| 313 | if (fs.existsSync(PID_FILE)) { |
| 314 | fs.unlinkSync(PID_FILE); |
| 315 | } |
| 316 | } |
no outgoing calls
no test coverage detected