import { afterEach, describe, it, expect, vi } from "vitest"; import { lintHyperframeHtml, lintMediaUrls } from "./hyperframeLinter.js"; afterEach(() => vi.unstubAllGlobals()); describe("lintHyperframeHtml — orchestrator", () => { const validComposition = `
`; it("reports no errors for a valid composition", async () => { const result = await lintHyperframeHtml(validComposition); expect(result.ok).toBe(true); expect(result.errorCount).toBe(0); }); it("attaches filePath to findings when option is set", async () => { const html = "
"; const result = await lintHyperframeHtml(html, { filePath: "test.html" }); for (const finding of result.findings) { expect(finding.file).toBe("test.html"); } }); it("deduplicates identical findings", async () => { const html = `
`; const result = await lintHyperframeHtml(html); const codes = result.findings.map((f) => `${f.code}|${f.message}`); const uniqueCodes = [...new Set(codes)]; expect(codes.length).toBe(uniqueCodes.length); }); it("strips