Remove duplicated destroy
-calls in the "custom ownerDocument" unit-tests
Given that `PDFDocumentProxy.destroy` is nothing but an alias for `PDFDocumentLoadingTask.destroy` calling both methods is obviously not useful.
This commit is contained in:
parent
8e4ef6d89d
commit
fe5d9b4b6a
@ -172,7 +172,7 @@ describe("custom ownerDocument", function () {
|
||||
expect(style).toBeFalsy();
|
||||
expect(ownerDocument.fonts.size).toBeGreaterThanOrEqual(1);
|
||||
expect(Array.from(ownerDocument.fonts).find(checkFont)).toBeTruthy();
|
||||
await doc.destroy();
|
||||
|
||||
await loadingTask.destroy();
|
||||
CanvasFactory.destroy(canvasAndCtx);
|
||||
expect(ownerDocument.fonts.size).toBe(0);
|
||||
@ -204,7 +204,7 @@ describe("custom ownerDocument", function () {
|
||||
const style = elements.find(element => element.tagName === "style");
|
||||
expect(style.sheet.cssRules.length).toBeGreaterThanOrEqual(1);
|
||||
expect(style.sheet.cssRules.find(checkFontFaceRule)).toBeTruthy();
|
||||
await doc.destroy();
|
||||
|
||||
await loadingTask.destroy();
|
||||
CanvasFactory.destroy(canvasAndCtx);
|
||||
expect(style.remove.called).toBe(true);
|
||||
|
Loading…
Reference in New Issue
Block a user