From ee68139d9f2148038b25a2f13887297e28500ae2 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Mon, 18 Mar 2024 16:48:35 +0100 Subject: [PATCH] chore(ci): Start testing under Node.js 20 (16.x was removed) (#7963) Node.js 16 is deprecated, starting from 0.35. It's time to remove it from CI, because we don't provide any guaranties for supporting it. --- .github/workflows/push.yml | 2 +- packages/cubejs-api-gateway/test/index.test.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 459053d5228b8..3476590e8e238 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -44,7 +44,7 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] fail-fast: false steps: diff --git a/packages/cubejs-api-gateway/test/index.test.ts b/packages/cubejs-api-gateway/test/index.test.ts index b22ae87fc829f..44753d779265e 100644 --- a/packages/cubejs-api-gateway/test/index.test.ts +++ b/packages/cubejs-api-gateway/test/index.test.ts @@ -112,8 +112,9 @@ describe('API Gateway', () => { .set('Authorization', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M') .expect(400); - expect(res.body && res.body.error).toStrictEqual( - 'Unable to decode query param as JSON, error: Unexpected token N in JSON at position 0' + expect(res.body && res.body.error).toContain( + // different JSON.parse errors between Node.js versions + 'Unable to decode query param as JSON, error: Unexpected token' ); });