mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 18:12:52 +00:00
20 lines
701 B
TypeScript
20 lines
701 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { normalizeZaloReactionIcon } from "./reaction.js";
|
|
|
|
describe("zalouser reaction alias normalization", () => {
|
|
it("maps common aliases", () => {
|
|
expect(normalizeZaloReactionIcon("like")).toBe("/-strong");
|
|
expect(normalizeZaloReactionIcon("👍")).toBe("/-strong");
|
|
expect(normalizeZaloReactionIcon("heart")).toBe("/-heart");
|
|
expect(normalizeZaloReactionIcon("😂")).toBe(":>");
|
|
});
|
|
|
|
it("defaults empty icon to like", () => {
|
|
expect(normalizeZaloReactionIcon("")).toBe("/-strong");
|
|
});
|
|
|
|
it("passes through unknown custom reactions", () => {
|
|
expect(normalizeZaloReactionIcon("/custom")).toBe("/custom");
|
|
});
|
|
});
|