11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst net = require('net'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst c = net.createConnection(common.PORT); 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_cic.on('connect', common.mustNotCall()); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cic.on('error', common.mustCall(function(e) { 111cb0ef41Sopenharmony_ci assert.strictEqual(e.code, 'ECONNREFUSED'); 121cb0ef41Sopenharmony_ci assert.strictEqual(e.port, common.PORT); 131cb0ef41Sopenharmony_ci assert.match(e.address, /^(127\.0\.0\.1|::1)$/); 141cb0ef41Sopenharmony_ci})); 15