



























@@ -1143,7 +1143,7 @@ describe("/acp command", () => {
11431143expect(introText).toContain("cwd: /home/bob/clawd");
11441144expectBoundIntroTextToExclude("session ids: pending (available after the first reply)");
11451145expectGatewayMethodNotCalled("sessions.patch");
1146-expect(hoisted.upsertAcpSessionMetaMock).toHaveBeenCalled();
1146+expect(hoisted.upsertAcpSessionMetaMock).toHaveBeenCalledTimes(1);
11471147const upsertArgs = hoisted.upsertAcpSessionMetaMock.mock.calls[0]?.[0] as
11481148| {
11491149sessionKey: string;
@@ -1631,7 +1631,15 @@ describe("/acp command", () => {
16311631targetSessionKey: defaultAcpSessionKey,
16321632reason: "manual",
16331633});
1634-expect(hoisted.upsertAcpSessionMetaMock).toHaveBeenCalled();
1634+expect(hoisted.upsertAcpSessionMetaMock).toHaveBeenCalledTimes(1);
1635+const clearMetaArgs = hoisted.upsertAcpSessionMetaMock.mock.calls[0]?.[0] as
1636+| {
1637+sessionKey: string;
1638+mutate: (current: unknown, entry: { sessionId: string; updatedAt: number }) => unknown;
1639+}
1640+| undefined;
1641+expect(clearMetaArgs?.sessionKey).toBe(defaultAcpSessionKey);
1642+expect(clearMetaArgs?.mutate(undefined, { sessionId: "session-1", updatedAt: 0 })).toBeNull();
16351643expect(result?.reply?.text).toContain("Removed 1 binding");
16361644});
16371645此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。