import { describe, it, expect, vi } from "vitest"; import type { ReactElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { renderGenerativeUI } from "../renderGenerativeUI"; import { createActionRegistry } from "../actionRegistry"; import type { GenerativeUIDispatch } from "../types"; import { listVocabulary } from "./list"; const render = (node: unknown) => renderToStaticMarkup(<>{renderGenerativeUI(node, listVocabulary)}); describe("listVocabulary", () => { it("ListView renders a ul wrapping its children", () => { const html = render({ $type: "ListView", children: [ { $type: "ListViewItem", children: "a" }, { $type: "ListViewItem", children: "b" }, ], }); expect(html).toContain('