Skip to content

Commit 11ac9c6

Browse files
pd4d10danielleadams
authored andcommitted
test: improve coverage of lib/_http_outgoing.js
Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_outgoing.js.html#L351 Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_outgoing.js.html#L609 PR-URL: #38734 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7fb809b commit 11ac9c6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/parallel/test-http-information-headers.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
require('../common');
2+
constcommon=require('../common');
33
constassert=require('assert');
44
consthttp=require('http');
55
constCountdown=require('../common/countdown');
@@ -13,7 +13,7 @@ const server = http.createServer((req, res) => {
1313
// to call res.writeHead instead
1414
res._writeRaw('HTTP/1.1 102 Processing\r\n');
1515
res._writeRaw('Foo: Bar\r\n');
16-
res._writeRaw('\r\n');
16+
res._writeRaw('\r\n',common.mustCall());
1717
console.error('Server sending full response...');
1818
res.writeHead(200,{
1919
'Content-Type': 'text/plain',

‎test/parallel/test-http-mutable-headers.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const s = http.createServer(common.mustCall((req, res) => {
4747
constexoticObj=Object.create(null);
4848
assert.deepStrictEqual(headers,exoticObj);
4949
assert.deepStrictEqual(res.getHeaderNames(),[]);
50+
assert.deepStrictEqual(res.getRawHeaderNames(),[]);
5051
assert.deepStrictEqual(res.hasHeader('Connection'),false);
5152
assert.deepStrictEqual(res.getHeader('Connection'),undefined);
5253

0 commit comments

Comments
 (0)