Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
1234567891011121314151617181920212223import { describe, expect, it } from "vitest";import { createElement as h } from "react";import { renderEmail } from "./renderEmail";
describe("renderEmail", () => { it("drops React's image preload hints and keeps the images", async () => { const html = await renderEmail( h( "html", null, h("head"), h( "body", null, h("img", { src: "https://example.com/a.png?b=1&c=2", alt: "" }), ), ), ); expect(html).not.toContain('rel="preload"'); expect(html).toContain('src="https://example.com/a.png?b=1&c=2"'); });});