import { expect, test } from "bun:test" import { createMarkdownParser } from "./marked-parser" const parser = createMarkdownParser((code, language) => `
${code}
`) test("renders links with application attributes", async () => { expect(await parser.parse("[OpenCode](https://opencode.ai)")).toBe( '

OpenCode

\n', ) }) test("renders inline and block math", async () => { expect(await parser.parse("\\(x^2\\)")).toContain('') expect(await parser.parse("$$\nx^2\n$$\n")).toContain('') }) test("uses the configured code highlighter", async () => { expect(await parser.parse("```ts\nconst value = 1\n```\n")).toBe('
const value = 1
\n') })