Running the tests doesn't check the result of the worker based pdf processing code. This should be the case.

const pdfDoc = await loadingTask.promise;
      const pdfPage = await pdfDoc.getPage(1);
      const viewport = pdfPage.getViewport({ scale: 1 });
      const canvasAndCtx = CanvasFactory.create(
        viewport.width,
        viewport.height
      );
      const renderTask = pdfPage.render({
        canvasContext: canvasAndCtx.context,
        canvasFactory: CanvasFactory,
        viewport,
      });
      expect(renderTask instanceof RenderTask).toEqual(true);
      await renderTask.promise;
      await pdfDoc.cleanup();
      expect(true).toEqual(true);
      CanvasFactory.destroy(canvasAndCtx);
      await loadingTask.destroy();
    });
    it("cleans up document resources during rendering of page", async function () {
      const loadingTask = getDocument(
        buildGetDocumentParams("tracemonkey.pdf")
      );
      const pdfDoc = await loadingTask.promise;
      const pdfPage = await pdfDoc.getPage(1);
      const viewport = pdfPage.getViewport({ scale: 1 });
      const canvasAndCtx = CanvasFactory.create(
        viewport.width,
        viewport.height
      );