mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 16:24:46 +00:00
test: tighten msteams outbound poll assertion
This commit is contained in:
@@ -138,13 +138,18 @@ describe("msteamsOutbound cfg threading", () => {
|
||||
options: ["Pizza", "Sushi"],
|
||||
maxSelections: 1,
|
||||
});
|
||||
expect(mocks.createPoll).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
id: "poll-1",
|
||||
question: "Snack?",
|
||||
options: ["Pizza", "Sushi"],
|
||||
}),
|
||||
);
|
||||
const [pollRecord] = mocks.createPoll.mock.calls[0] ?? [];
|
||||
expect(pollRecord).toEqual({
|
||||
id: "poll-1",
|
||||
question: "Snack?",
|
||||
options: ["Pizza", "Sushi"],
|
||||
maxSelections: 1,
|
||||
createdAt: pollRecord?.createdAt,
|
||||
conversationId: "conv-1",
|
||||
messageId: "msg-poll-1",
|
||||
votes: {},
|
||||
});
|
||||
expect(Number.isNaN(Date.parse(pollRecord?.createdAt))).toBe(false);
|
||||
});
|
||||
|
||||
it("chunks outbound text without requiring MSTeams runtime initialization", () => {
|
||||
|
||||
Reference in New Issue
Block a user