import { describe, it, expect } from 'vitest'; import { controllerNegotiationEntries } from './controller-negotiation.mjs'; describe('controllerNegotiationEntries', () => { it('пустой/нет раздела → []', () => { expect(controllerNegotiationEntries('')).toEqual([]); expect(controllerNegotiationEntries('# План\nтекст')).toEqual([]); }); it('извлекает круги контроллера дословно', () => { const md = '## Переговоры\n\n### Круг 1\nкарточка добавлена в тело плана\n'; expect(controllerNegotiationEntries(md)).toEqual([ { round: 1, side: 'controller', utterance: 'карточка добавлена в тело плана', justification: '' }, ]); }); });