import { describe, it, expect } from "vitest"; import { conventionalNames } from "./project-templates"; /** * The convention has to reproduce UNG's existing comp names exactly, or * enabling per-project templates would silently break the show it was built * for: every findComp in the panel resolves through it. */ describe("conventionalNames", () => { it("reproduces UNG's existing template names", () => { expect(conventionalNames("UNG")).toEqual({ overlayComp: "UNG_VFX_OVERLAY", previewComp: "UNG_EXPORT_TEMPLATE", lutComp: "_SHOW LUT", }); }); it("derives names for a show with a longer id", () => { const names = conventionalNames("DH2_VFX"); expect(names.overlayComp).toBe("DH2_VFX_VFX_OVERLAY"); expect(names.previewComp).toBe("DH2_VFX_EXPORT_TEMPLATE"); }); it("keeps the LUT comp name constant across shows", () => { // What differs between shows is the LUT inside the comp, which is why the // template AEP is per-project rather than the comp name. expect(conventionalNames("SNV").lutComp).toBe("_SHOW LUT"); expect(conventionalNames("QTK").lutComp).toBe("_SHOW LUT"); }); it("falls back to a placeholder rather than producing _VFX_OVERLAY", () => { expect(conventionalNames("").overlayComp).toBe("SHOW_VFX_OVERLAY"); }); });