import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { describe, expect, it } from "vitest"; import { compileHtml } from "./htmlCompiler.js"; describe("compileHtml", () => { it("decodes HTML source attributes before interpreting their URL suffixes", async () => { const project = mkdtempSync(join(tmpdir(), "hf-entity-media-")); writeFileSync(join(project, "it's&a.wav"), "duration witness"); try { const compiled = await compileHtml( `