Skip to content

Commit

Permalink
Fix test to work with optional content.
Browse files Browse the repository at this point in the history
- Change the stopAtErrors test to ensure the operator list has something,
  instead of asserting the exact number of operators.
  • Loading branch information
Brendan Dahl authored and brendandahl committed Jul 16, 2020
1 parent 9bd7db2 commit 8707bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1636,8 +1636,8 @@ describe("api", function () {
const result1 = loadingTask1.promise.then(pdfDoc => {
return pdfDoc.getPage(1).then(pdfPage => {
return pdfPage.getOperatorList().then(opList => {
expect(opList.fnArray.length).toEqual(722);
expect(opList.argsArray.length).toEqual(722);
expect(opList.fnArray.length).toBeGreaterThan(100);
expect(opList.argsArray.length).toBeGreaterThan(100);
expect(opList.lastChunk).toEqual(true);

return loadingTask1.destroy();
Expand Down

0 comments on commit 8707bbe

Please sign in to comment.