Release Font Tools v0.1.0

This commit is contained in:
2026-09-01 14:35:39 +02:00
commit 25ff321f2a
65 changed files with 10590 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { previewDocument } from "../../src/core/preview";
describe("sandbox preview document", () => {
it("escapes text and allows no script capability", () => {
const html = previewDocument(
"blob:http://localhost/fixture",
'<script>alert("x")</script>',
42,
1.2,
{ wght: 550 },
);
expect(html).toContain("&lt;script&gt;");
expect(html).not.toContain('<script>alert("x")</script>');
expect(html).toContain("default-src 'none'");
expect(html).toContain("&quot;wght&quot; 550");
});
});