mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 01:48:28 +00:00
test: remove duplicate line quick-reply assertions
This commit is contained in:
@@ -52,13 +52,6 @@ describe("createQuickReplyItems", () => {
|
|||||||
"This is a very long option label that exceeds the limit",
|
"This is a very long option label that exceeds the limit",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("creates message actions for each item", () => {
|
|
||||||
const quickReply = createQuickReplyItems(["A", "B"]);
|
|
||||||
|
|
||||||
expect((quickReply.items[0].action as { type: string }).type).toBe("message");
|
|
||||||
expect((quickReply.items[1].action as { type: string }).type).toBe("message");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("createTextMessageWithQuickReplies", () => {
|
describe("createTextMessageWithQuickReplies", () => {
|
||||||
@@ -71,14 +64,6 @@ describe("createTextMessageWithQuickReplies", () => {
|
|||||||
expect(message.quickReply.items).toHaveLength(2);
|
expect(message.quickReply.items).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("preserves text content", () => {
|
|
||||||
const longText =
|
|
||||||
"This is a longer message that asks the user to select from multiple options below.";
|
|
||||||
const message = createTextMessageWithQuickReplies(longText, ["A", "B", "C"]);
|
|
||||||
|
|
||||||
expect(message.text).toBe(longText);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("handles empty quick replies array", () => {
|
it("handles empty quick replies array", () => {
|
||||||
const message = createTextMessageWithQuickReplies("No options", []);
|
const message = createTextMessageWithQuickReplies("No options", []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user