fix(andreknie.de): close SEO review gaps

This commit is contained in:
2026-07-28 22:53:37 +02:00
parent 215aacf4a4
commit 4ca2c1ece8
5 changed files with 46 additions and 14 deletions
@@ -25,6 +25,25 @@ describe('SEOHead', () => {
expect(document.head.querySelector('link[rel="canonical"]')?.getAttribute('href')).toBe('https://andreknie.de/artikel')
})
it('replaces static fallback metadata instead of duplicating it', () => {
document.head.insertAdjacentHTML('beforeend', `
<title data-seo-fallback>Fallback</title>
<meta data-seo-fallback name="description" content="Fallback description">
<link data-seo-fallback rel="canonical" href="https://andreknie.de/">
`)
render(
<HelmetProvider>
<SEOHead title="Artikel" description="Article description" url="/artikel" />
</HelmetProvider>,
)
expect(document.head.querySelectorAll('[data-seo-fallback]')).toHaveLength(0)
expect(document.head.querySelectorAll('title')).toHaveLength(1)
expect(document.head.querySelectorAll('meta[name="description"]')).toHaveLength(1)
expect(document.head.querySelectorAll('link[rel="canonical"]')).toHaveLength(1)
})
it('normalizes relative and absolute image URLs', () => {
const { rerender } = render(
<HelmetProvider>