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

canvasContext: canvasAndCtx.context,
        canvasFactory: CanvasFactory,
        viewport,
      });
      expect(renderTask instanceof RenderTask).toEqual(true);
      renderTask.cancel();
      try {
        await renderTask.promise;
        
        expect(false).toEqual(true);
      } catch (reason) {
        expect(reason instanceof RenderingCancelledException).toEqual(true);
      }
      const reRenderTask = page.render({
        canvasContext: canvasAndCtx.context,
        canvasFactory: CanvasFactory,
        viewport,
      });
      expect(reRenderTask instanceof RenderTask).toEqual(true);
      await reRenderTask.promise;
      CanvasFactory.destroy(canvasAndCtx);
    });
    it("multiple render() on the same canvas", async function () {
      const optionalContentConfigPromise =
        pdfDocument.getOptionalContentConfig();
      const viewport = page.getViewport({ scale: 1 });
      const canvasAndCtx = CanvasFactory.create(
        viewport.width,
        viewport.height
      );