diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce37224d3..2428514cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: node-version: - 18 - 20 + - 22 services: redis: diff --git a/packages/engine.io-client/test/index.js b/packages/engine.io-client/test/index.js index 237d199a7..5e481865c 100644 --- a/packages/engine.io-client/test/index.js +++ b/packages/engine.io-client/test/index.js @@ -7,8 +7,6 @@ if (env.browser) { require("./node"); } -const Blob = require("blob"); - require("./engine.io-client"); require("./socket"); require("./transport"); @@ -23,6 +21,6 @@ if (typeof ArrayBuffer !== "undefined") { } // Blob is available in Node.js since v18, but not yet supported by the `engine.io-parser` package -if (Blob && env.browser) { +if (typeof Blob === "function" && env.browser) { require("./blob"); } diff --git a/packages/engine.io/test/common.js b/packages/engine.io/test/common.js index 136395fbb..4b5d5a595 100644 --- a/packages/engine.io/test/common.js +++ b/packages/engine.io/test/common.js @@ -1,3 +1,8 @@ +if (process.env.EIO_CLIENT === "3" && process.versions.node.startsWith("22")) { + // FIXME WebSocket error with engine.io-client@3 + global.WebSocket = null; +} + const { listen, uServer } = require(".."); const { Socket } = process.env.EIO_CLIENT === "3"