import { describe, it, expect, beforeAll } from 'vitest'; import { execSync } from 'node:child_process'; import { readFileSync } from 'node:fs'; describe('BaseLayout SEO tags and theming', () => { beforeAll(() => { execSync('npm run build', { stdio: 'inherit' }); }); it('sets canonical and hreflang alternates pointing at each other', () => { const en = readFileSync('dist/en/index.html', 'utf-8'); const fr = readFileSync('dist/fr/index.html', 'utf-8'); expect(en).toContain('rel="canonical" href="https://www.ombrora.com/en/"'); expect(en).toContain('hreflang="fr" href="https://www.ombrora.com/fr/"'); expect(fr).toContain('rel="canonical" href="https://www.ombrora.com/fr/"'); expect(fr).toContain('hreflang="en" href="https://www.ombrora.com/en/"'); }); it('uses the locale-specific meta title and description', () => { const en = readFileSync('dist/en/index.html', 'utf-8'); const fr = readFileSync('dist/fr/index.html', 'utf-8'); expect(en).toContain('