mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-20 21:51:28 +00:00
test(followup): cover messageChannel normalization
This commit is contained in:
@@ -513,4 +513,22 @@ describe("createFollowupRunner agentDir forwarding", () => {
|
||||
const call = runEmbeddedPiAgentMock.mock.calls.at(-1)?.[0] as { agentDir?: string };
|
||||
expect(call?.agentDir).toBe(agentDir);
|
||||
});
|
||||
|
||||
it("normalizes originatingChannel before forwarding messageChannel", async () => {
|
||||
runEmbeddedPiAgentMock.mockClear();
|
||||
runEmbeddedPiAgentMock.mockResolvedValueOnce({
|
||||
payloads: [{ text: "hello world!" }],
|
||||
meta: {},
|
||||
});
|
||||
const runner = createFollowupRunner({
|
||||
opts: { onBlockReply: createAsyncReplySpy() },
|
||||
typing: createMockTypingController(),
|
||||
typingMode: "instant",
|
||||
defaultModel: "anthropic/claude-opus-4-5",
|
||||
});
|
||||
await runner(createQueuedRun({ originatingChannel: " FEISHU " }));
|
||||
|
||||
const call = runEmbeddedPiAgentMock.mock.calls.at(-1)?.[0] as { messageChannel?: string };
|
||||
expect(call?.messageChannel).toBe("feishu");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user