Skip to content

Commit

Permalink
Fix test failure with Node 18.20.3 (#7898)
Browse files Browse the repository at this point in the history
Our CI installs the latest version associated with a given Node version,
so it started to fail when this started loading v18.20.3 which reverted
the change backported to v18.19.
  • Loading branch information
glasser authored Jul 10, 2024
1 parent 268687d commit a5271e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .changeset/four-dogs-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ Object.keys(schemes).forEach((schemeName) => {
// idle connections in these versions. However, `Stopper` _is_ still
// useful for gracefully finishing in-flight requests within the timeout
// (and aborting requests beyond the timeout).
// Update: Node 18.19+ had this change backported, so the comment from above
// applies to Node 18.19+ as well.
const isNode18 = !!process.version.match(/^v18\./);
//
// (Node 18.19.0 had this change backported but it was removed again in
// 18.20.3; our tests only pin major versions so we can assume 18 means
// >= 18.20.3.) Update: Node 18.19+ had this change backported, so the
// comment from above applies to Node 18.19+ as well.
const isNode20 = !!process.version.match(/^v20\./);
expect(closed).toBe(isNode18 || isNode20 ? 1 : 0);
expect(closed).toBe(isNode20 ? 1 : 0);
});

// This test specifically added for Node 20 fails for Node 14. Just going
Expand Down

0 comments on commit a5271e5

Please sign in to comment.