Skip to content

Commit

Permalink
test: improve coverage of lib/_http_outgoing.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pd4d10 authored and richardlau committed Jul 20, 2021
1 parent 6ea1368 commit aeea252
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-information-headers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
Expand All @@ -13,7 +13,7 @@ const server = http.createServer((req, res) => {
// to call res.writeHead instead
res._writeRaw('HTTP/1.1 102 Processing\r\n');
res._writeRaw('Foo: Bar\r\n');
res._writeRaw('\r\n');
res._writeRaw('\r\n', common.mustCall());
console.error('Server sending full response...');
res.writeHead(200, {
'Content-Type': 'text/plain',
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-http-mutable-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const s = http.createServer(common.mustCall((req, res) => {
const exoticObj = Object.create(null);
assert.deepStrictEqual(headers, exoticObj);
assert.deepStrictEqual(res.getHeaderNames(), []);
assert.deepStrictEqual(res.getRawHeaderNames(), []);
assert.deepStrictEqual(res.hasHeader('Connection'), false);
assert.deepStrictEqual(res.getHeader('Connection'), undefined);

Expand Down

0 comments on commit aeea252

Please sign in to comment.