import { describe, expect, test } from 'vitest' import { exportPage } from './html' import { pageSchema, type Page } from '@/lib/schema/page' function makeBase(overrides: Partial): Page { const base: Page = { title: 'T', locale: 'en', theme: { primaryColor: '#000000', fontFamily: 'Inter' }, sections: [], form: { actionUrl: '', fields: [], spamProtection: { honeypotFieldName: '_hp', minSubmitSeconds: 2 } }, analytics: { ga4MeasurementId: '', metaPixelId: '', customHeadHtml: '' }, seo: { title: 'SEO', description: 'Desc' }, } return pageSchema.parse({ ...base, ...overrides }) } describe('Exporter - Features and Testimonials sections', () => { test('renders features list with items and classes', () => { const sections = ([ { type: 'features', props: { items: ['One', 'Two', 'Three'] } }, ] as unknown) as Page['sections'] const page = makeBase({ sections }) const out = exportPage(page) expect(out.html).toContain('
') expect(out.html).toContain('