Skip to content

Commit 0707a6b

Browse files
Trottaddaleax
authored andcommitted
test: refactor test-http-hostname-typechecking
* Use common.mustCall() to confirm callback is invoked. * Change spacing of require statements to conform to test-writing guide. PR-URL: #13993 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 534ae44 commit 0707a6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-http-hostname-typechecking.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
2-
32
const common = require('../common');
3+
44
const assert = require('assert');
55
const http = require('http');
66

@@ -21,7 +21,7 @@ vals.forEach((v) => {
2121
// These values are OK and should not throw synchronously
2222
['', undefined, null].forEach((v) => {
2323
assert.doesNotThrow(() => {
24-
http.request({hostname: v}).on('error', common.noop).end();
25-
http.request({host: v}).on('error', common.noop).end();
24+
http.request({hostname: v}).on('error', common.mustCall()).end();
25+
http.request({host: v}).on('error', common.mustCall()).end();
2626
});
2727
});

0 commit comments

Comments
 (0)