import { describe, expect, it } from 'vitest'; import { extractFaqsFromHtml } from './extractFaqs'; describe('FAQ heading boundaries', () => { it('never merges intervening care lists or section headings into a question', () => { const html = `
این اقدامات درمان نیستند.
مواد خانگی استفاده نکنید.
خیر، معاینه لازم است.
`; expect(extractFaqsFromHtml(html)).toEqual([ { question: 'چه چیزهایی داخل گوش نریزیم؟', answer: 'مواد خانگی استفاده نکنید.' }, { question: 'آیا بو یعنی عفونت است؟', answer: 'خیر، معاینه لازم است.' }, ]); }); });