test: restore no-op function in test
Remove common.mustCall() in test that might connect to a server already running on the local host. PR-URL: https://github.com/nodejs/node/pull/14065 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
a577bde917
commit
5b1d12a092
@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
require('../common');
|
||||
|
||||
const assert = require('assert');
|
||||
const http = require('http');
|
||||
@ -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.mustCall()).end();
|
||||
http.request({host: v}).on('error', common.mustCall()).end();
|
||||
http.request({hostname: v}).on('error', () => {}).end();
|
||||
http.request({host: v}).on('error', () => {}).end();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user