diff --git a/test/parallel/test-net-better-error-messages-port-hostname.js b/test/parallel/test-net-better-error-messages-port-hostname.js index 04974908c91e87..dac17141677dcb 100644 --- a/test/parallel/test-net-better-error-messages-port-hostname.js +++ b/test/parallel/test-net-better-error-messages-port-hostname.js @@ -4,12 +4,12 @@ const net = require('net'); const assert = require('assert'); // Using port 0 as hostname used is already invalid. -const c = net.createConnection(0, '***'); +const c = net.createConnection(0, 'this.hostname.is.invalid'); c.on('connect', common.mustNotCall()); c.on('error', common.mustCall(function(e) { assert.strictEqual(e.code, 'ENOTFOUND'); assert.strictEqual(e.port, 0); - assert.strictEqual(e.hostname, '***'); + assert.strictEqual(e.hostname, 'this.hostname.is.invalid'); })); diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js index 1006a62d330054..1b65ce15ab8a1c 100644 --- a/test/parallel/test-net-connect-immediate-finish.js +++ b/test/parallel/test-net-connect-immediate-finish.js @@ -24,14 +24,17 @@ const common = require('../common'); const assert = require('assert'); const net = require('net'); -const client = net.connect({ host: '***', port: common.PORT }); +const client = net.connect({ + host: 'this.hostname.is.invalid', + port: common.PORT +}); client.once('error', common.mustCall((err) => { assert(err); assert.strictEqual(err.code, err.errno); assert.strictEqual(err.code, 'ENOTFOUND'); assert.strictEqual(err.host, err.hostname); - assert.strictEqual(err.host, '***'); + assert.strictEqual(err.host, 'this.hostname.is.invalid'); assert.strictEqual(err.syscall, 'getaddrinfo'); }));