Skip to content

Commit b3f0cab

Browse files
ci: add Node.js 20 in the test matrix
Reference: https://github.com/nodejs/Release
1 parent 5a3eafe commit b3f0cab

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [14, 16]
19+
node-version:
20+
- 14
21+
- 20
2022

2123
steps:
2224
- name: Checkout repository
@@ -41,10 +43,10 @@ jobs:
4143
- name: Checkout repository
4244
uses: actions/checkout@v3
4345

44-
- name: Use Node.js 16
46+
- name: Use Node.js 20
4547
uses: actions/setup-node@v3
4648
with:
47-
node-version: 16
49+
node-version: 20
4850

4951
- name: Install dependencies
5052
run: npm ci

test/connection.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,10 @@ describe("connection", () => {
771771
});
772772
}
773773

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

0 commit comments

Comments
 (0)