test: tighten msteams outbound poll assertion

This commit is contained in:
Shakker
2026-05-11 00:33:43 +01:00
parent 294844b421
commit 07903fa572

View File

@@ -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", () => {