import { Marked } from "@earendil-works/pi-tui"; import { describe, expect, it, vi } from "vitest"; import { createGoalRenderer } from "../src/goal-markdown.ts"; describe("browser goal Markdown", () => { it("renders paragraphs and explicit Markdown structures, not one giant heading", () => { const render = createGoalRenderer(); expect(render("Ordinary goal")).toBe("

Ordinary goal

\n"); const html = render( [ "# Actual heading", "", "Paragraph **strong** and *emphasis* with `code`.", "", "- first", "- [x] done", "- [ ] pending", "", "1. ordered", "", "> quoted", "", "```ts", "const x = '';", "```", "", "| Gate | Result |", "| --- | --- |", "| tests | pass |", ].join("\n"), ); for (const fragment of [ "

Actual heading

", "

Paragraph strong and emphasis with code.

", "