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",
'',
42,
1.2,
{ wght: 550 },
{ features: '"liga" 1', language: "ar", direction: "rtl" },
);
expect(html).toContain("<script>");
expect(html).not.toContain('');
expect(html).toContain("default-src 'none'");
expect(html).toContain('"wght" 550');
expect(html).toContain('font-feature-settings:"liga" 1');
expect(html).toContain('lang="ar" dir="rtl"');
});
});