import { describe, expect, it } from 'vitest' import { beautifyHtml, highlightCode } from './code-example' describe('beautifyHtml', () => { it('re-indents nested markup with two spaces', () => { expect(beautifyHtml('
x
')).toBe('
x
') expect(beautifyHtml('
\nx\n
')).toBe('
\n x\n
') }) }) describe('highlightCode', () => { it('renders shiki-highlighted html for the given language', async () => { const html = await highlightCode('x', 'html') expect(html).toContain('