node/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js
Paolo Insogna 05975d1fb1
net: add autoSelectFamily global getter and setter
PR-URL: https://github.com/nodejs/node/pull/45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-12-24 14:44:11 +00:00

10 lines
220 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const net = require('net');
assert.throws(() => {
net.connect({ port: 8080, autoSelectFamily: 'INVALID' });
}, { code: 'ERR_INVALID_ARG_TYPE' });