import { describe, expect, it } from "vitest"; import { contentKindWhere } from "@/utils/mailContent"; describe("contentKindWhere", () => { it("packs list filter looks at spreadsheet filenames", () => { const w = contentKindWhere("PACKING_LIST"); expect(w.attachments).toBeTruthy(); }); it("plain text requires no attachments", () => { const w = contentKindWhere("PLAIN_TEXT"); expect(w.attachments).toEqual({ none: {} }); }); it("empty is no attachments plus empty body", () => { const w = contentKindWhere("EMPTY"); expect(w.attachments).toEqual({ none: {} }); expect(w.OR).toEqual([{ bodyText: null }, { bodyText: "" }]); }); });