Attempt to reduce intermittent failures in the "cleans up document resources during rendering of page" unit-test

This patch should *hopefully* remove the `Unhandled promise rejection: ...` errors, by returning the "final" promise. Also, by pausing/delaying of rendering slightly the likelihood of the test failing in the first place should thus be reduced.
This commit is contained in:
Jonas Jenwald 2020-07-26 13:54:41 +02:00
parent 311ca6e796
commit 86a8fd9810

View File

@ -1906,7 +1906,11 @@ describe("api", function () {
viewport,
});
pdfDoc
renderTask.onContinue = function (cont) {
waitSome(cont);
};
return pdfDoc
.cleanup()
.then(
() => {