import { describe, it, expect } from "vitest"; import * as React from "react"; import { render } from "./index"; import { MintelLogo } from "./components/MintelLogo"; import { ContactFormNotification } from "./templates/ContactFormNotification"; describe("@mintel/mail rendering", () => { it("should render the MintelLogo to HTML", async () => { const html = await render(React.createElement(MintelLogo)); expect(html).toContain("Mintel Logo"); }); it("should render a ContactFormNotification to HTML", async () => { const html = await render( React.createElement(ContactFormNotification, { name: "Test User", email: "test@example.com", message: "Hello World", }), ); expect(html).toContain("New Submission"); expect(html).toContain("Test User"); expect(html).toContain("test@example.com"); }); });