Skip to content

Commit

Permalink
test(remix): Test Remix SDK on Node 20.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Jul 18, 2023
1 parent cfd2149 commit c5fed53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18]
node: [14, 16, 18, 20]
remix: [1, 2]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand Down
10 changes: 10 additions & 0 deletions packages/node-integration-tests/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ export class TestEnv {
public constructor(public readonly server: http.Server, public readonly url: string) {
this.server = server;
this.url = url;

// We need to destroy the socket after the response has been sent
// to prevent the server.close (called inside nock interceptor) from hanging in tests.
// Otherwise the tests may timeout. (Happening on Node 20)
// See: https://github.com/nodejs/node/issues/2642
this.server.on('request', (req, res) => {
res.on('finish', () => {
req.socket.destroy();
});
});
}

/**
Expand Down

0 comments on commit c5fed53

Please sign in to comment.