{"version":3,"sources":["../../src/sections/list-section.test.ts"],"sourcesContent":["import { type ListOptions, ListSection } from './list-section.js';\n\ninterface ListItem {\n  text: string;\n}\n\nfunction createListSection(options: ListOptions<ListItem>) {\n  class TestList extends ListSection<ListItem> {\n    protected itemMapper(item: ListItem): string {\n      return item.text;\n    }\n  }\n\n  return new TestList(options);\n}\n\ndescribe('List Section', () => {\n  it('should return the title', () => {\n    const section = createListSection({ title: 'Test List', type: 'None' });\n    expect(section.synthesize()).toBe('## Test List\\n\\n');\n  });\n\n  it('should return the items', () => {\n    const section = createListSection({ title: 'Test List', type: 'None' });\n    section.add({ text: 'Item 1' }).add({ text: 'Item 2' });\n    expect(section.synthesize()).toBe(\n      ['## Test List', '', 'Item 1', '', 'Item 2'].join('\\n'),\n    );\n  });\n\n  it('should return an ordered list', () => {\n    const section = createListSection({ title: 'Test List', type: 'Ordered' });\n    section.add({ text: 'Item 1' }).add({ text: 'Item 2' });\n    expect(section.synthesize()).toBe(\n      ['## Test List', '', '1. Item 1', '', '2. Item 2'].join('\\n'),\n    );\n  });\n\n  it('should return an unordered list', () => {\n    const section = createListSection({\n      title: 'Test List',\n      type: 'Unordered',\n    });\n    section.add({ text: 'Item 1' }).add({ text: 'Item 2' });\n    expect(section.synthesize()).toBe(\n      ['## Test List', '', '- Item 1', '', '- Item 2'].join('\\n'),\n    );\n  });\n\n  it('should allow for custom titles', () => {\n    const section = createListSection({\n      title: 'Test List',\n      type: 'Unordered',\n    });\n    expect(section.synthesize()).toBe('## Test List\\n\\n');\n  });\n});\n"],"mappings":";AAAA,0BAA8C;AAM9C,SAAS,kBAAkB,SAAgC;AAAA,EACzD,MAAM,iBAAiB,gCAAsB;AAAA,IACjC,WAAW,MAAwB;AAC3C,aAAO,KAAK;AAAA,IACd;AAAA,EACF;AAEA,SAAO,IAAI,SAAS,OAAO;AAC7B;AAEA,SAAS,gBAAgB,MAAM;AAC7B,KAAG,2BAA2B,MAAM;AAClC,UAAM,UAAU,kBAAkB,EAAE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