fix(andreknie.de): normalize SEO metadata and document structure
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { renderMarkdownContent } from './vite-plugin-content.js'
|
||||
|
||||
describe('markdown content rendering', () => {
|
||||
it('removes only an initial level-one heading', () => {
|
||||
const html = renderMarkdownContent('# Duplicate title\n\nIntro\n\n## Section')
|
||||
|
||||
expect(html).not.toContain('<h1>Duplicate title</h1>')
|
||||
expect(html).toContain('<p>Intro</p>')
|
||||
expect(html).toContain('<h2>Section</h2>')
|
||||
})
|
||||
|
||||
it('keeps content when no initial level-one heading exists', () => {
|
||||
const html = renderMarkdownContent('Intro\n\n# Deliberate heading')
|
||||
|
||||
expect(html).toContain('<p>Intro</p>')
|
||||
expect(html).toContain('<h1>Deliberate heading</h1>')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user