From 2156917891a85975b78fffd16406e6bd153b2b7e Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Thu, 12 Jan 2023 10:33:28 -0800 Subject: [PATCH] Add Node 19 testing --- .github/workflows/main.yml | 1 + test/net/helpers.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15c420c8c3..2bda17804e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,6 +65,7 @@ jobs: os: - "ubuntu-latest" node: + - "19" - "18" - "16" - "14" diff --git a/test/net/helpers.js b/test/net/helpers.js index b49fefb29a..ce216d18e1 100644 --- a/test/net/helpers.js +++ b/test/net/helpers.js @@ -166,7 +166,13 @@ const createHttpClientTestSuite = (createHttpClientFn, extraTestsFn) => { await response.toJSON(); fail(); } catch (e) { - expect(e.message).to.contain('Unexpected end of JSON input'); + expect(e.message).to.satisfy( + (v) => + // Node < 19 + v.includes('Unexpected end of JSON input') || + // Node >= 19 + v.includes('Unterminated string in JSON at position 3') + ); } }); });