fix(test): assert negative pid in start full-stop test
killProcessTree on Unix targets the process group first via process.kill(-pid, signal); only falls back to positive pid if that throws. The test mock returns true, so only the negative-pid call ever fires. Update assertion to match the actual call. Caught by CI on Linux (test was Windows-skipped locally).
This commit is contained in:
parent
e071f63e5a
commit
170c1ca7f7
|
|
@ -2004,7 +2004,10 @@ describe("start command — platform-aware runtime fallback", () => {
|
|||
|
||||
await program.parseAsync(["node", "test", "stop"]);
|
||||
|
||||
expect(killSpy).toHaveBeenCalledWith(99999, "SIGTERM");
|
||||
// killProcessTree on Unix targets the process group first via NEGATIVE pid;
|
||||
// only falls back to positive pid if that throws. The mock returns true,
|
||||
// so only the negative-pid call fires.
|
||||
expect(killSpy).toHaveBeenCalledWith(-99999, "SIGTERM");
|
||||
expect(mockUnregister).toHaveBeenCalled();
|
||||
expect(mockRemoveProjectFromRunning).not.toHaveBeenCalled();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue