import { describe, expect, it } from "vitest"; import { normalizeMarkup, serialize } from "./serialize.js"; describe("serialize", () => { it("writes attributes in name order and escapes text, so two frameworks' output can be compared", () => { const el = document.createElement("div"); el.innerHTML = ''; expect(serialize(el.firstChild as Node)).toBe(''); }); }); describe("normalizeMarkup", () => { it("drops comment nodes and whitespace between elements", () => { expect(normalizeMarkup("