import { describe, expect, it } from "bun:test"; import { escapeHtml } from "./html"; describe("HTML Utils", () => { it("should escape special characters", () => { const unsafe = ''; const safe = escapeHtml(unsafe); expect(safe).toBe("<script>alert("xss")</script>"); }); it("should handle mixed content", () => { const unsafe = 'Hello & "World"'; const safe = escapeHtml(unsafe); expect(safe).toBe("Hello & "World""); }); });