mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 12:10:42 +00:00
test: clarify telegram sticker cache assertions
This commit is contained in:
@@ -146,19 +146,28 @@ describe("sticker-cache", () => {
|
||||
it("finds stickers by description substring", () => {
|
||||
const results = stickerCache.searchStickers("fox");
|
||||
expect(results).toHaveLength(2);
|
||||
expect(results.every((s) => s.description.toLowerCase().includes("fox"))).toBe(true);
|
||||
expect(results.map((sticker) => sticker.fileUniqueId)).toEqual([
|
||||
"fox-unique-1",
|
||||
"fox-unique-2",
|
||||
]);
|
||||
});
|
||||
|
||||
it("finds stickers by emoji", () => {
|
||||
const results = stickerCache.searchStickers("🦊");
|
||||
expect(results).toHaveLength(2);
|
||||
expect(results.every((s) => s.emoji === "🦊")).toBe(true);
|
||||
expect(results.map((sticker) => sticker.fileUniqueId)).toEqual([
|
||||
"fox-unique-1",
|
||||
"fox-unique-2",
|
||||
]);
|
||||
});
|
||||
|
||||
it("finds stickers by set name", () => {
|
||||
const results = stickerCache.searchStickers("CuteFoxes");
|
||||
expect(results).toHaveLength(2);
|
||||
expect(results.every((s) => s.setName === "CuteFoxes")).toBe(true);
|
||||
expect(results.map((sticker) => sticker.fileUniqueId)).toEqual([
|
||||
"fox-unique-1",
|
||||
"fox-unique-2",
|
||||
]);
|
||||
});
|
||||
|
||||
it("respects limit parameter", () => {
|
||||
|
||||
Reference in New Issue
Block a user