1
0
Fork 0
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:
Tim van der Meij 2021-12-28 19:40:34 +01:00 committed by GitHub
commit e42d54e1b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 102 additions and 120 deletions

View file

@ -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()]);