Slightly extend the "creates pdf doc from PDF file with bad XRef table" unit-test (PR 14304 follow-up)

Given that we're able to "render" this document, let's extend the unit-test to actually check that we're able to obtain the operatorList; although given the overall issues in the document it'll be empty.
This commit is contained in:
Jonas Jenwald 2021-11-29 22:33:48 +01:00
parent e045cd4520
commit 8ea740c800

View File

@ -457,6 +457,14 @@ describe("api", function () {
const pdfDocument = await loadingTask.promise;
expect(pdfDocument.numPages).toEqual(1);
const page = await pdfDocument.getPage(1);
expect(page instanceof PDFPageProxy).toEqual(true);
const opList = await page.getOperatorList();
expect(opList.fnArray.length).toEqual(0);
expect(opList.argsArray.length).toEqual(0);
expect(opList.lastChunk).toEqual(true);
await loadingTask.destroy();
});