mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue