(bytes: Uint8Array)
| 456 | |
| 457 | describe("extractFormSchema field-tree handling", () => { |
| 458 | async function schemaFor(bytes: Uint8Array) { |
| 459 | const doc = await getDocument({ data: bytes }).promise; |
| 460 | try { |
| 461 | const fo = (await doc.getFieldObjects()) as Parameters< |
| 462 | typeof extractFormSchema |
| 463 | >[1]; |
| 464 | return await extractFormSchema(doc, fo); |
| 465 | } finally { |
| 466 | doc.destroy(); |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | it("handles pdf-lib separated field/widget structure", async () => { |
| 471 | const d = await PDFDocument.create(); |
no test coverage detected
searching dependent graphs…