ci: add Node.js 20 in the test matrix

Reference: https://github.com/nodejs/Release
This commit is contained in:
Damien Arrachequesne
2023-11-24 08:39:53 +01:00
parent 5a3eafed1c
commit b3f0cab1a0
2 changed files with 9 additions and 4 deletions

View File

@@ -16,7 +16,9 @@ jobs:
strategy:
matrix:
node-version: [14, 16]
node-version:
- 14
- 20
steps:
- name: Checkout repository
@@ -41,10 +43,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js 16
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: Install dependencies
run: npm ci

View File

@@ -771,7 +771,10 @@ describe("connection", () => {
});
}
if (global.Blob && null != textBlobBuilder("xxx")) {
// Blob is available in Node.js since v18, but not yet supported by the `engine.io-parser` package
const isBrowser = typeof window !== "undefined";
if (isBrowser && global.Blob && textBlobBuilder("xxx") !== null) {
it("should send binary data (as a Blob)", () => {
return wrap((done) => {
const socket = io(BASE_URL, { forceNew: true });