feat: migrate Payload CMS to MDX and harden static infrastructure

This commit is contained in:
2026-05-04 14:48:04 +02:00
parent d51e220802
commit d3141187ee
165 changed files with 7654 additions and 16136 deletions

View File

@@ -0,0 +1,23 @@
import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
describe('Performance Standard: Image Sizes Prop', () => {
it('should ensure the Header logo has a sizes prop to prevent Next.js warnings', () => {
const headerPath = path.resolve(__dirname, '../components/Header.tsx');
const headerContent = fs.readFileSync(headerPath, 'utf-8');
// Check if the logo image has a sizes prop
// The logo uses src={logoSrc} and width={120} height={120}
const hasSizesProp = /<Image[^>]*sizes=[^>]*>/g.test(headerContent);
expect(hasSizesProp).toBe(true);
});
it('should ensure the Footer logo has a sizes prop to prevent Next.js warnings', () => {
const footerPath = path.resolve(__dirname, '../components/Footer.tsx');
const footerContent = fs.readFileSync(footerPath, 'utf-8');
const hasSizesProp = /<Image[^>]*sizes=[^>]*>/g.test(footerContent);
expect(hasSizesProp).toBe(true);
});
});