We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2ad652 commit c8d2556Copy full SHA for c8d2556
1 file changed
test/unit/api_spec.js
@@ -197,11 +197,14 @@ describe("api", function () {
197
expect(loadingTask instanceof PDFDocumentLoadingTask).toEqual(true);
198
// This can be somewhat random -- we cannot guarantee perfect
199
// 'Terminate' message to the worker before/after setting up pdfManager.
200
+ const loadingTaskPromise = loadingTask.promise.catch(() => {
201
+ // Shouldn't get here.
202
+ });
203
const destroyed = loadingTask._worker.promise.then(() =>
204
loadingTask.destroy()
205
);
206
- await destroyed;
207
+ await Promise.all([destroyed, loadingTaskPromise]);
208
expect(true).toEqual(true);
209
});
210
0 commit comments