You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
676 B
21 lines
676 B
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: "" }]);
|
|
});
|
|
});
|