Files
buzz-sheet/lib/commission/reaction.test.ts
T
2026-10-02 17:33:14 +07:00

13 lines
520 B
TypeScript

import { describe, expect, it } from "vitest";
import { isSingleEmoji } from "./reaction";
describe("commission reactions", () => {
it("accepts emoji outside the old six choices, including sequences", () => {
for (const emoji of ["🔥", "🇹🇭", "👨‍👩‍👧‍👦", "1️⃣"]) expect(isSingleEmoji(emoji)).toBe(true);
});
it("rejects text and multiple reactions", () => {
for (const value of ["", "hello", "1", "🔥🔥", "🔥 hello"]) expect(isSingleEmoji(value)).toBe(false);
});
});