()
| 6 | import { openSimPptxViewer, SIM_PPTX_LIST_OPTIONS } from '@/lib/pptx-renderer/sim-pptx-viewer' |
| 7 | |
| 8 | async function createMinimalPptx(): Promise<ArrayBuffer> { |
| 9 | const zip = new JSZip() |
| 10 | zip.file('[Content_Types].xml', '<Types />') |
| 11 | zip.file( |
| 12 | 'ppt/presentation.xml', |
| 13 | `<p:presentation xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"> |
| 14 | <p:sldSz cx="9144000" cy="5143500" /> |
| 15 | <p:sldIdLst><p:sldId id="256" r:id="rId1" /></p:sldIdLst> |
| 16 | </p:presentation>` |
| 17 | ) |
| 18 | zip.file( |
| 19 | 'ppt/_rels/presentation.xml.rels', |
| 20 | `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> |
| 21 | <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide1.xml" /> |
| 22 | </Relationships>` |
| 23 | ) |
| 24 | zip.file( |
| 25 | 'ppt/slides/slide1.xml', |
| 26 | `<p:sld xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"> |
| 27 | <p:cSld> |
| 28 | <p:spTree> |
| 29 | <p:nvGrpSpPr><p:cNvPr id="1" name="" /><p:cNvGrpSpPr /><p:nvPr /></p:nvGrpSpPr> |
| 30 | <p:grpSpPr /> |
| 31 | </p:spTree> |
| 32 | </p:cSld> |
| 33 | </p:sld>` |
| 34 | ) |
| 35 | zip.file('ppt/slides/_rels/slide1.xml.rels', '<Relationships />') |
| 36 | return zip.generateAsync({ type: 'arraybuffer' }) |
| 37 | } |
| 38 | |
| 39 | describe('openSimPptxViewer', () => { |
| 40 | it('renders a minimal PPTX and cleans up the container on destroy', async () => { |
no outgoing calls
no test coverage detected