• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2require('../common');
3
4// This test ensures that `net.Socket` does not inherit the no-half-open
5// enforcer from `stream.Duplex`.
6
7const { Socket } = require('net');
8const { strictEqual } = require('assert');
9
10const socket = new Socket({ allowHalfOpen: false });
11strictEqual(socket.listenerCount('end'), 1);
12