Clean-up after the gets operatorList with JPEG image (issue 4888)
unit-test
This unit-test wasn't destroying the `loadingTask` when complete, as it should have done.
This commit is contained in:
parent
6f94a05a29
commit
2b0b6178f7
@ -1224,11 +1224,12 @@ describe('api', function() {
|
||||
pdfPage.getOperatorList().then((opList) => {
|
||||
let imgIndex = opList.fnArray.indexOf(OPS.paintImageXObject);
|
||||
let imgArgs = opList.argsArray[imgIndex];
|
||||
let { data: imgData, } = pdfPage.objs.get(imgArgs[0]);
|
||||
let { data, } = pdfPage.objs.get(imgArgs[0]);
|
||||
|
||||
expect(imgData instanceof Uint8ClampedArray).toEqual(true);
|
||||
expect(imgData.length).toEqual(90000);
|
||||
done();
|
||||
expect(data instanceof Uint8ClampedArray).toEqual(true);
|
||||
expect(data.length).toEqual(90000);
|
||||
|
||||
loadingTask.destroy().then(done);
|
||||
});
|
||||
});
|
||||
}).catch(done.fail);
|
||||
|
Loading…
Reference in New Issue
Block a user