Merge pull request #9956 from brendandahl/allow-zero-progress

Allow loaded progress of 0 in unit tests.
This commit is contained in:
Tim van der Meij 2018-08-04 00:19:02 +02:00 committed by GitHub
commit 444976bcd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ describe('api', function() {
loadingTask.promise
];
Promise.all(promises).then(function (data) {
expect((data[0].loaded / data[0].total) > 0).toEqual(true);
expect((data[0].loaded / data[0].total) >= 0).toEqual(true);
expect(data[1] instanceof PDFDocumentProxy).toEqual(true);
expect(loadingTask).toEqual(data[1].loadingTask);
loadingTask.destroy().then(done);