Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

test(pi): check the TERM cleanup only where Pi gets a TERM

Sebastian B9b06e4dc08a5
diff --git a/server/drivers/pi-lifecycle.test.ts b/server/drivers/pi-lifecycle.test.ts
index 358be600d7..7288425aa7 100644
--- a/server/drivers/pi-lifecycle.test.ts
+++ b/server/drivers/pi-lifecycle.test.ts
@@ -61,7 +61,8 @@ it.each(["interrupt", "stopAll", "dispose"])("keeps ownership through %s until t
expect(ownedWhileStopping).toBe(true);
expect(() => process.kill(pid, 0)).toThrow();
expect(runningAtCompletion).toBe(false);
- expect(readFileSync(join(dir, "rpc.jsonl"), "utf8")).toContain('"terminated":true');
+ // Windows stops the CLI with taskkill /F: no TERM handler runs there.
+ if (process.platform !== "win32") expect(readFileSync(join(dir, "rpc.jsonl"), "utf8")).toContain('"terminated":true');
expect(events.events.filter((event) => event.type === "turn.completed")).toMatchObject([
{ ok: true, stopReason: "cancelled" },
]);