Files
plainleaf/client/markdown_renderer/html_render.test.ts
T
Zef Hemel 02bd8ed362 Migration Deno -> Node.js
* First pass
* Now using vitest for tests
2026-02-14 22:08:35 +01:00

21 lines
471 B
TypeScript

import { expect, test } from "vitest";
import { renderHtml } from "./html_render.ts";
test("HTML Render", () => {
expect(renderHtml({
name: "b",
body: "hello",
})).toEqual(`<b>hello</b>`);
expect(renderHtml({
name: "a",
attrs: {
href: "https://example.com",
},
body: "hello",
})).toEqual(`<a href="https://example.com">hello</a>`);
expect(renderHtml({
name: "span",
body: "<>",
})).toEqual(`<span>&lt;&gt;</span>`);
});