Files
landing/tests/routing.test.ts
T
anthony e9d34f9d13 feat: scaffold Astro project with en/fr i18n routing
Sets output to static (Astro default) with path-based i18n routing
(/en/, /fr/) and no unprefixed default-locale route, per the hub
landing page design spec.
2026-08-02 15:50:28 +02:00

16 lines
532 B
TypeScript

import { describe, it, expect } from 'vitest';
import { readFileSync, existsSync } from 'node:fs';
describe('locale routing', () => {
it('builds /en/ and /fr/ pages with correct lang attributes', () => {
const en = readFileSync('dist/en/index.html', 'utf-8');
const fr = readFileSync('dist/fr/index.html', 'utf-8');
expect(en).toContain('lang="en"');
expect(fr).toContain('lang="fr"');
});
it('does not build an unprefixed root page', () => {
expect(existsSync('dist/index.html')).toBe(false);
});
});