mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #14400 from Snuffleupagus/getPageDict-async
[api-minor] Convert `Catalog.getPageDict` to an asynchronous method
This commit is contained in:
commit
e42d54e1b5
3 changed files with 102 additions and 120 deletions
|
@ -622,9 +622,7 @@ describe("api", function () {
|
|||
expect(false).toEqual(true);
|
||||
} catch (reason) {
|
||||
expect(reason instanceof UnknownErrorException).toEqual(true);
|
||||
expect(reason.message).toEqual(
|
||||
"Page dictionary kids object is not an array."
|
||||
);
|
||||
expect(reason.message).toEqual("Illegal character: 41");
|
||||
}
|
||||
try {
|
||||
await pdfDocument2.getPage(1);
|
||||
|
@ -633,9 +631,7 @@ describe("api", function () {
|
|||
expect(false).toEqual(true);
|
||||
} catch (reason) {
|
||||
expect(reason instanceof UnknownErrorException).toEqual(true);
|
||||
expect(reason.message).toEqual(
|
||||
"Page dictionary kids object is not an array."
|
||||
);
|
||||
expect(reason.message).toEqual("End of file inside array.");
|
||||
}
|
||||
|
||||
await Promise.all([loadingTask1.destroy(), loadingTask2.destroy()]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue