test: stabilize CLI hint assertions under CLAWDBOT_PROFILE (#2507)

This commit is contained in:
Vignesh
2026-01-26 19:20:54 -08:00
committed by GitHub
parent 959ddae612
commit b151b8d196
9 changed files with 22 additions and 9 deletions

View File

@@ -47,7 +47,9 @@ describe("gateway tool", () => {
payload?: { kind?: string; doctorHint?: string | null };
};
expect(parsed.payload?.kind).toBe("restart");
expect(parsed.payload?.doctorHint).toBe("Run: clawdbot doctor --non-interactive");
expect(parsed.payload?.doctorHint).toBe(
"Run: clawdbot --profile isolated doctor --non-interactive",
);
expect(kill).not.toHaveBeenCalled();
await vi.runAllTimersAsync();

View File

@@ -104,7 +104,7 @@ describe("acquireSessionWriteLock", () => {
});
it("cleans up locks on SIGINT without removing other handlers", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-lock-"));
const originalKill = process.kill.bind(process);
const originalKill = process.kill.bind(process) as typeof process.kill;
const killCalls: Array<NodeJS.Signals | undefined> = [];
let otherHandlerCalled = false;