mirror of
https://github.com/nodejs/node.git
synced 2025-12-27 23:41:14 +00:00
PR-URL: https://github.com/nodejs/node/pull/60761 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
12 lines
320 B
JavaScript
12 lines
320 B
JavaScript
'use strict';
|
|
require('../common');
|
|
|
|
// This test ensures that `net.Socket` does not inherit the no-half-open
|
|
// enforcer from `stream.Duplex`.
|
|
|
|
const { Socket } = require('net');
|
|
const assert = require('assert');
|
|
|
|
const socket = new Socket({ allowHalfOpen: false });
|
|
assert.strictEqual(socket.listenerCount('end'), 1);
|