(filePath: string, entries: Record<string, string>)
| 6 | import { createWorkspaceDocumentPreview } from './document-preview'; |
| 7 | |
| 8 | async function writeZip(filePath: string, entries: Record<string, string>): Promise<void> { |
| 9 | const zip = new JSZip(); |
| 10 | for (const [name, content] of Object.entries(entries)) { |
| 11 | zip.file(name, content); |
| 12 | } |
| 13 | const bytes = await zip.generateAsync({ type: 'nodebuffer' }); |
| 14 | await writeFile(filePath, bytes); |
| 15 | } |
| 16 | |
| 17 | describe('createWorkspaceDocumentPreview', () => { |
| 18 | it('extracts a lightweight docx preview without treating the file as UTF-8 text', async () => { |
no test coverage detected