diff --git a/test/async-hooks/test-httpparser.request.js b/test/async-hooks/test-httpparser.request.js index ca15172de1..c6e18be5a6 100644 --- a/test/async-hooks/test-httpparser.request.js +++ b/test/async-hooks/test-httpparser.request.js @@ -9,7 +9,6 @@ const { checkInvocations } = require('./hook-checks'); const binding = process.binding('http_parser'); const HTTPParser = binding.HTTPParser; -const CRLF = '\r\n'; const REQUEST = HTTPParser.REQUEST; const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0; @@ -19,7 +18,7 @@ const hooks = initHooks(); hooks.enable(); const request = Buffer.from( - 'GET /hello HTTP/1.1' + CRLF + CRLF + 'GET /hello HTTP/1.1\r\n\r\n' ); const parser = new HTTPParser(REQUEST); diff --git a/test/async-hooks/test-httpparser.response.js b/test/async-hooks/test-httpparser.response.js index 5723ac6fbd..d56e3e1fec 100644 --- a/test/async-hooks/test-httpparser.response.js +++ b/test/async-hooks/test-httpparser.response.js @@ -43,7 +43,7 @@ function onheadersComplete() { 'when onheadersComplete called'); } -function onbody(buf, start, len) { +function onbody() { checkInvocations(httpparser, { init: 1, before: 2, after: 1 }, 'when onbody called'); tick(1, common.mustCall(tick1));