11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst net = require('net'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst socket = new net.Socket(); 61cb0ef41Sopenharmony_cisocket.resetAndDestroy(); 71cb0ef41Sopenharmony_ci// Emit error if socket is not connecting/connected 81cb0ef41Sopenharmony_cisocket.on('error', common.mustCall( 91cb0ef41Sopenharmony_ci common.expectsError({ 101cb0ef41Sopenharmony_ci code: 'ERR_SOCKET_CLOSED', 111cb0ef41Sopenharmony_ci name: 'Error' 121cb0ef41Sopenharmony_ci })) 131cb0ef41Sopenharmony_ci); 14