xref: /third_party/node/test/parallel/test-net-connect-reset.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
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

Indexes created Thu Nov 07 10:32:03 CST 2024