Files

18 lines
577 B
TypeScript

import { describe, it, expect, beforeAll } from 'vitest';
import { execSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
describe('footer', () => {
beforeAll(() => {
execSync('npm run build', { stdio: 'inherit' });
});
it('renders the current year and brand name on both locales', () => {
const en = readFileSync('dist/en/index.html', 'utf-8');
const fr = readFileSync('dist/fr/index.html', 'utf-8');
const yearPattern = /©\s*\d{4}\s*Ombrora/;
expect(en).toMatch(yearPattern);
expect(fr).toMatch(yearPattern);
});
});