Skip to content

Commit

Permalink
Fix node 20 failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kanongil authored and Marsup committed Jan 29, 2024
1 parent 23d6550 commit da1f7d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ describe('Request', () => {

const client = Net.connect(server.info.port, () => {

client.write('GET / HTTP/1.1\r\n\r\n');
client.write('GET / HTTP/1.1\r\n\r\n');
client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n');
client.write('GET / HTTP/1.1\r\nHost: host\r\n\r\n');
});

client.on('data', () => {
Expand Down Expand Up @@ -662,9 +662,9 @@ describe('Request', () => {

const client = Net.connect(server.info.port, () => {

client.write('GET /test HTTP/1.1\r\n\r\n');
client.write('GET /test HTTP/1.1\r\n\r\n');
client.write('GET /test HTTP/1.1\r\n\r\n');
client.write('GET /test HTTP/1.1\r\nHost: host\r\n\r\n');
client.write('GET /test HTTP/1.1\r\nHost: host\r\n\r\n');
client.write('GET /test HTTP/1.1\r\nHost: host\r\n\r\n');
});

await team.work;
Expand Down
2 changes: 1 addition & 1 deletion test/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe('Route', () => {
expect(res.statusCode).to.equal(200);
expect(logged).to.be.an.object();
expect(logged.error).to.be.an.error('Invalid request payload JSON format');
expect(logged.error.data).to.be.an.error(SyntaxError, /^Unexpected token a/);
expect(logged.error.data).to.be.an.error(SyntaxError, /at position 1/);
});

it('returns payload parsing errors', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/transmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ describe('transmission', () => {
const log = server.events.once('response');
const client = Net.connect(server.info.port, () => {

client.write('GET / HTTP/1.1\r\naccept-encoding: gzip\r\n\r\n');
client.write('GET / HTTP/1.1\r\nHost: host\r\naccept-encoding: gzip\r\n\r\n');
});

const [request] = await log;
Expand Down

0 comments on commit da1f7d7

Please sign in to comment.