mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #18159 from Snuffleupagus/loadingParams-test
Improve the `loadingParams` functionality in the API
This commit is contained in:
commit
17e09e5478
2 changed files with 22 additions and 10 deletions
|
@ -1069,6 +1069,23 @@ describe("api", function () {
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets loadingParams", async function () {
|
||||
const loadingTask = getDocument(
|
||||
buildGetDocumentParams(basicApiFileName, {
|
||||
disableAutoFetch: true,
|
||||
enableXfa: true,
|
||||
})
|
||||
);
|
||||
const pdfDoc = await loadingTask.promise;
|
||||
|
||||
expect(pdfDoc.loadingParams).toEqual({
|
||||
disableAutoFetch: true,
|
||||
enableXfa: true,
|
||||
});
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets page", async function () {
|
||||
const data = await pdfDocument.getPage(1);
|
||||
expect(data instanceof PDFPageProxy).toEqual(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue