mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:44:32 +00:00
test: remove redundant quick-reply creation smoke case
This commit is contained in:
@@ -2,14 +2,6 @@ import { describe, expect, it } from "vitest";
|
|||||||
import { createQuickReplyItems } from "./send.js";
|
import { createQuickReplyItems } from "./send.js";
|
||||||
|
|
||||||
describe("createQuickReplyItems", () => {
|
describe("createQuickReplyItems", () => {
|
||||||
it("creates quick reply items from labels", () => {
|
|
||||||
const quickReply = createQuickReplyItems(["Option 1", "Option 2", "Option 3"]);
|
|
||||||
|
|
||||||
expect(quickReply.items).toHaveLength(3);
|
|
||||||
expect((quickReply.items[0].action as { label: string }).label).toBe("Option 1");
|
|
||||||
expect((quickReply.items[0].action as { text: string }).text).toBe("Option 1");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("limits items to 13 (LINE maximum)", () => {
|
it("limits items to 13 (LINE maximum)", () => {
|
||||||
const labels = Array.from({ length: 20 }, (_, i) => `Option ${i + 1}`);
|
const labels = Array.from({ length: 20 }, (_, i) => `Option ${i + 1}`);
|
||||||
const quickReply = createQuickReplyItems(labels);
|
const quickReply = createQuickReplyItems(labels);
|
||||||
|
|||||||
Reference in New Issue
Block a user