13 lines
520 B
TypeScript
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);
|
|
});
|
|
});
|