import { describe, it, expect } from 'vitest' import { pageSchema, type Page } from '@/lib/schema/page' import { exportPage } from '@/lib/exporter/html' const makePage = (): Page => pageSchema.parse({ title: 'Benefits Test', locale: 'en', theme: { primaryColor: '#0ea5e9', fontFamily: 'Inter' }, sections: [ { type: 'benefits', props: { items: ['Fast setup', 'No code', 'Accessible by default'] } }, ], form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } }, seo: { title: 'SEO', description: 'Desc' }, }) describe('Exporter - benefits section', () => { it('renders benefits as a section with h2 and aria-labelledby + list items', () => { const out = exportPage(makePage()) const html = out.html expect(html).toContain('
') expect(html).toContain('

Benefits

') expect(html).toContain('