diff --git a/test/unit/annotation_spec.js b/test/unit/annotation_spec.js index 239cab8aa..3153a4154 100644 --- a/test/unit/annotation_spec.js +++ b/test/unit/annotation_spec.js @@ -35,7 +35,6 @@ import { import { CMAP_URL, createIdFactory, - getNodeVersion, STANDARD_FONT_DATA_URL, XRefMock, } from "./test_utils.js"; @@ -2209,10 +2208,9 @@ describe("annotation", function () { }); it("should compress and save text", async function () { - if (isNodeJS && getNodeVersion().major >= 20) { + if (isNodeJS) { pending( - "CompressionStream behaves differently in Node.js >= 20, " + - "compared to Firefox, Chrome, and Node.js 18." + "CompressionStream behaves differently in Node.js, compared to Firefox and Chrome." ); } const textWidgetRef = Ref.get(123, 0); diff --git a/test/unit/test_utils.js b/test/unit/test_utils.js index 7dcdc5542..111c05006 100644 --- a/test/unit/test_utils.js +++ b/test/unit/test_utils.js @@ -144,22 +144,11 @@ function createIdFactory(pageIndex) { return page._localIdFactory; } -function getNodeVersion() { - if (!isNodeJS) { - throw new Error("getNodeVersion - only valid in Node.js environments."); - } - const [major, minor, patch] = process.versions.node - .split(".") - .map(parseFloat); - return { major, minor, patch }; -} - export { buildGetDocumentParams, CMAP_URL, createIdFactory, DefaultFileReaderFactory, - getNodeVersion, STANDARD_FONT_DATA_URL, TEST_PDFS_PATH, XRefMock,