test: fixup test-http-hostname-typechecking
This test would currently create HTTP requests to localhost:80 and would time out on machines that actually had an server listening there. To address that, `end()` the requests that are generated. PR-URL: https://github.com/nodejs/node/pull/12627 Ref: https://github.com/nodejs/node/pull/12494 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
f6b1eb2ec4
commit
28f535a923
@ -21,7 +21,7 @@ vals.forEach((v) => {
|
||||
// These values are OK and should not throw synchronously
|
||||
['', undefined, null].forEach((v) => {
|
||||
assert.doesNotThrow(() => {
|
||||
http.request({hostname: v}).on('error', common.noop);
|
||||
http.request({host: v}).on('error', common.noop);
|
||||
http.request({hostname: v}).on('error', common.noop).end();
|
||||
http.request({host: v}).on('error', common.noop).end();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user