import { describe, it, expect } from 'vitest' import { exportPage } from '@/lib/exporter/html' import { pageSchema, type Page } from '@/lib/schema/page' function makePage(): Page { return pageSchema.parse({ title: 'Sections Regression Features/FAQ', locale: 'en', theme: { primaryColor: '#0ea5e9', fontFamily: 'Inter' }, sections: [ { type: 'features', props: { items: ['F1', 'F2', 'F3'] } }, { type: 'faq', props: { items: [{ q: 'Q1', a: 'A1' }, { q: 'Q2', a: 'A2' }] } }, ], form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } }, seo: { title: 'SEO', description: 'Desc' }, }) } describe('Exporter - Features/FAQ regression (structure/classes/count)', () => { it('renders features with list, class names, and correct item count', () => { const out = exportPage(makePage()) const html = out.html expect(html).toMatch(/
/) expect(html).toMatch(/

Features<\/h2>/) expect(html).toMatch(/