import { useMarkdownRaw } from '~/composables/useMarkdown' describe('useMarkdownRaw', () => { describe('anchors', () => { it('should add target="_blank" to external links', () => { const html = useMarkdownRaw('https://open.audio') expect(html).toBe('

https://open.audio

') }) it('should not link raw path', () => { const html = useMarkdownRaw('/library/tags') expect(html).toBe('

/library/tags

') }) it('should not add target="_blank" to internal links', () => { const html = useMarkdownRaw('[/library/tags](/library/tags)') expect(html).toBe('

/library/tags

') }) it('should handle multiple links', () => { const html = useMarkdownRaw('https://open.audio https://funkwhale.audio') expect(html).toBe('

https://open.audio https://funkwhale.audio

') }) }) })