diff --git a/packages/cli/__tests__/commands/start.test.ts b/packages/cli/__tests__/commands/start.test.ts index 022be9239..9857db1d4 100644 --- a/packages/cli/__tests__/commands/start.test.ts +++ b/packages/cli/__tests__/commands/start.test.ts @@ -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();