Skip to content

Commit

Permalink
Fix & explicitly enable v22 testing in CI
Browse files Browse the repository at this point in the history
This requires updating some tests we had which sent invalid line endings
(unintentionally, while testing other types of invalid request) - HTTP
does strictly require \r\n, not just \n.
  • Loading branch information
pimterry committed Apr 30, 2024
1 parent 64091fc commit 1e15901
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x, v20.11.1, '*']
node-version: [14.x, 16.x, 18.x, 20.x, v20.11.1, 22.x, '*']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion test/integration/proxying/http-proxying.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ nodeOnly(() => {
it("should mock proxied HTTP matching badly formatted URLs with empty paths", async () => {
await server.forGet('/').thenReply(200, 'Mock response');

const response = await sendRawRequest(server, 'GET http://example.com HTTP/1.1\n\n');
const response = await sendRawRequest(server, 'GET http://example.com HTTP/1.1\r\n\r\n');
expect(response).to.include('HTTP/1.1 200 OK');
expect(response).to.include('Mock response');
});
Expand Down
2 changes: 1 addition & 1 deletion test/integration/subscriptions/request-events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ describe("Request subscriptions", () => {
let seenRequestPromise = getDeferred<CompletedRequest>();
await server.on('request', (r) => seenRequestPromise.resolve(r));

sendRawRequest(server, 'GET http://example.com HTTP/1.1\n\n');
sendRawRequest(server, 'GET http://example.com HTTP/1.1\r\n\r\n');

let seenRequest = await seenRequestPromise;
expect(seenRequest.url).to.equal('http://example.com');
Expand Down

0 comments on commit 1e15901

Please sign in to comment.