Skip to content

Commit 8676fd2

Browse files
committed
test(sessions_send): narrow call.params type for runId access
1 parent a0351b3 commit 8676fd2

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎src/agents/openclaw-tools.sessions.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,11 @@ describe("sessions tools", () => {
895895

896896
expect(initialWaitCount).toBe(2);
897897
expect(
898-
calls.filter((call) => call.method === "agent.wait" && call.params?.runId === "run-1"),
898+
calls.filter(
899+
(call) =>
900+
call.method === "agent.wait" &&
901+
(call.params as { runId?: string } | undefined)?.runId === "run-1",
902+
),
899903
).toHaveLength(2);
900904
});
901905

@@ -968,7 +972,11 @@ describe("sessions tools", () => {
968972
await vi.waitFor(
969973
() => {
970974
expect(
971-
calls.filter((call) => call.method === "agent.wait" && call.params?.runId === "run-1"),
975+
calls.filter(
976+
(call) =>
977+
call.method === "agent.wait" &&
978+
(call.params as { runId?: string } | undefined)?.runId === "run-1",
979+
),
972980
).toHaveLength(2);
973981
},
974982
{ timeout: 2_000, interval: 5 },

0 commit comments

Comments
 (0)