Files
SlpSoftware/src/prerender/StaticLanding.test.tsx
T

20 lines
749 B
TypeScript

import { renderToString } from 'react-dom/server';
import { describe, expect, it } from 'vitest';
import { StaticLanding } from './StaticLanding';
import { heroContent } from '../features/landing/data/content';
describe('StaticLanding (prerender)', () => {
const html = renderToString(<StaticLanding />);
it('contains the hero heading and the section headings', () => {
expect(html).toContain('<h1');
expect(html).toContain(heroContent.heading.replace('&', '&amp;'));
expect(html).toContain('Eén ontwikkelaar, korte lijnen');
expect(html).toContain('Van idee naar live in drie stappen');
});
it('does not render the dynamic contact panel', () => {
expect(html).not.toContain('data-testid="contact-panel"');
});
});