import { describe, expect, it } from 'vitest' import { renderMarkdown } from '../src/renderer/src/markdown' describe('renderMarkdown', () => { it('renders headings, bold, italic and links', () => { const html = renderMarkdown('# Title\n\nSome **bold** and *italic* and [a](https://x.com).') expect(html).toContain('
code')
expect(html).toContain('I have 0 cats')
expect(html).toContain('1 dog.')
expect(html).not.toContain('undefined')
})
it('escapes HTML and never passes through raw tags', () => {
const html = renderMarkdown('A tag.')
expect(html).toContain('<script>')
expect(html).not.toContain('