Skip to content

Commit

Permalink
Add Node 19 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Jan 12, 2023
1 parent a91857a commit 2156917
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
os:
- "ubuntu-latest"
node:
- "19"
- "18"
- "16"
- "14"
Expand Down
8 changes: 7 additions & 1 deletion test/net/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
}
});
});
Expand Down

0 comments on commit 2156917

Please sign in to comment.