import { expect, test } from "bun:test"; import { fontCspSources, renderFontHead, renderProductionFontHead } from "../src/index.ts"; test("renders subsetted Google and escaped local font markup", () => { const html = renderFontHead({ google: [{ family: "Inter", weights: [700, 400] }], local: [ { family: 'Bad"', src: '/font".woff2', preload: true, }, ], }); expect(html).toContain("family=Inter:wght@400;700"); expect(html).not.toContain("