~james/core

core/web/src/lib/markup/render.test.ts -rw-r--r-- 498 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
import { describe, expect, it } from "vitest";
import { renderMarkup } from "#lib/markup/render.ts";
import type { MarkupContext } from "#lib/markup/paths.ts";

const ctx: MarkupContext = { repo: "ada.test/infra", ref: "main", host: "tangled.org" };

describe("renderMarkup", () => {
	it("renders a body whatever its name", async () => {
		const html = await renderMarkup("a **body**", ctx);
		expect(html).toMatch(/^<div data-markup>/);
		expect(html).toContain("<strong>body</strong>");
	});
});