diff --git a/test/parallel/test-http-hostname-typechecking.js b/test/parallel/test-http-hostname-typechecking.js index c3b702896d4e39..d1a407cf28dcae 100644 --- a/test/parallel/test-http-hostname-typechecking.js +++ b/test/parallel/test-http-hostname-typechecking.js @@ -1,6 +1,6 @@ 'use strict'; - const 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.noop).end(); - http.request({host: v}).on('error', common.noop).end(); + http.request({hostname: v}).on('error', common.mustCall()).end(); + http.request({host: v}).on('error', common.mustCall()).end(); }); });