From 43828d0d7007a3ba1c7c5989f9316bcb18644f9a Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Sat, 29 Aug 2026 17:52:30 +0000 Subject: [PATCH] chore: drop a leftover scratch test --- tests/zz-dump.test.ts | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 tests/zz-dump.test.ts diff --git a/tests/zz-dump.test.ts b/tests/zz-dump.test.ts deleted file mode 100644 index b0c50ed..0000000 --- a/tests/zz-dump.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { it } from 'vitest'; -import { unzipSync, strFromU8 } from 'fflate'; -import { buildOdt } from '../src/lib/export/odt'; -type N = any; -const cell = (t: string, formula?: string): N => ({ type: 'tableCell', attrs: { colspan: 1, rowspan: 1, colwidth: null, ...(formula ? { formula } : {}) }, content: [{ type: 'paragraph', content: [{ type: 'text', text: t }] }] }); -const doc: N = { type: 'doc', content: [ - { type: 'table', content: [ - { type: 'tableRow', content: [cell('2'), cell('3')] }, - { type: 'tableRow', content: [cell('5', 'SUM(ABOVE)'), cell('x')] }, - ] }, -] }; -it('dumps', async () => { - const bytes = await buildOdt(doc, { top: 2, bottom: 2, left: 2, right: 2 }, 'portrait'); - const xml = strFromU8(unzipSync(bytes)['content.xml']); - console.log(xml.match(/]*family="table-cell"[\s\S]*?<\/style:style>/g)?.join('\n')); - console.log(xml.slice(xml.indexOf('') + 14)); -});