Skip to content

Commit 0da8934

Browse files
test(agents): type announce delivery error response
1 parent 3e64322 commit 0da8934

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/agents/subagent-announce.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ import type { EmbeddedPiQueueMessageOutcome } from "./pi-embedded-runner/runs.js
33
import { createSubagentAnnounceDeliveryRuntimeMock } from "./subagent-announce.test-support.js";
44

55
type AgentCallRequest = { method?: string; params?: Record<string, unknown> };
6+
type AgentCallResponse = { runId?: string; status: string; error?: string };
67

7-
const agentSpy = vi.fn(async (_req: AgentCallRequest) => ({ runId: "run-main", status: "ok" }));
8+
const agentSpy = vi.fn(
9+
async (_req: AgentCallRequest): Promise<AgentCallResponse> => ({
10+
runId: "run-main",
11+
status: "ok",
12+
}),
13+
);
814
const sessionsDeleteSpy = vi.fn((_req: AgentCallRequest) => undefined);
915
const callGatewayMock = vi.fn(async (_request: unknown) => ({}));
1016
const loadSessionStoreMock = vi.fn((_storePath: string) => ({}));

0 commit comments

Comments
 (0)