Skip to content

Commit 23cd934

Browse files
erdunaddaleax
authored andcommitted
test: refactor test-httpparser.response.js
* replace CRLF constant with '\r\n' literal * fix typo in HTTP header name PR-URL: #14290 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent d11840c commit 23cd934

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/async-hooks/test-httpparser.response.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const { checkInvocations } = require('./hook-checks');
99
const binding = process.binding('http_parser');
1010
const HTTPParser = binding.HTTPParser;
1111

12-
const CRLF = '\r\n';
1312
const RESPONSE = HTTPParser.RESPONSE;
1413
const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0;
1514
const kOnBody = HTTPParser.kOnBody | 0;
@@ -19,10 +18,10 @@ const hooks = initHooks();
1918
hooks.enable();
2019

2120
const request = Buffer.from(
22-
'HTTP/1.1 200 OK' + CRLF +
23-
'Content-types: text/plain' + CRLF +
24-
'Content-Length: 4' + CRLF +
25-
CRLF +
21+
'HTTP/1.1 200 OK\r\n' +
22+
'Content-Type: text/plain\r\n' +
23+
'Content-Length: 4\r\n' +
24+
'\r\n' +
2625
'pong'
2726
);
2827

0 commit comments

Comments
 (0)