From 748e18c22eeefceb4030c8f8e5e9e9c342b05982 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Thu, 22 Feb 2024 10:11:59 +0100 Subject: [PATCH] ci: test with older TypeScript version Related: https://github.com/socketio/socket.io/issues/3891 --- .github/workflows/ci.yml | 4 ++++ test/connection-state-recovery.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f230ce3a3..5a21bdeba7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,10 @@ jobs: - name: Install dependencies run: npm ci + - name: Install TypeScript 4.2 + run: npm i typescript@4.2 + if: ${{ matrix.node-version == '16' }} + - name: Run tests run: npm test env: diff --git a/test/connection-state-recovery.ts b/test/connection-state-recovery.ts index b9d1678cb3..e84cae6a04 100644 --- a/test/connection-state-recovery.ts +++ b/test/connection-state-recovery.ts @@ -221,11 +221,11 @@ describe("connection state recovery", () => { const httpServer = createServer().listen(0); class DummyAdapter extends Adapter { - override persistSession(session) { + persistSession(session) { expect().fail(); } - override restoreSession(pid, offset) { + restoreSession(pid, offset) { expect().fail(); return Promise.reject("should not happen"); }