11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_cirequire('../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst net = require('net'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci// Tests that net.connect() called without arguments throws ERR_MISSING_ARGS. 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciassert.throws(() => { 101cb0ef41Sopenharmony_ci net.connect(); 111cb0ef41Sopenharmony_ci}, { 121cb0ef41Sopenharmony_ci code: 'ERR_MISSING_ARGS', 131cb0ef41Sopenharmony_ci message: 'The "options" or "port" or "path" argument must be specified', 141cb0ef41Sopenharmony_ci}); 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ciassert.throws(() => { 171cb0ef41Sopenharmony_ci new net.Socket().connect(); 181cb0ef41Sopenharmony_ci}, { 191cb0ef41Sopenharmony_ci code: 'ERR_MISSING_ARGS', 201cb0ef41Sopenharmony_ci message: 'The "options" or "port" or "path" argument must be specified', 211cb0ef41Sopenharmony_ci}); 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ciassert.throws(() => { 241cb0ef41Sopenharmony_ci net.connect({}); 251cb0ef41Sopenharmony_ci}, { 261cb0ef41Sopenharmony_ci code: 'ERR_MISSING_ARGS', 271cb0ef41Sopenharmony_ci message: 'The "options" or "port" or "path" argument must be specified', 281cb0ef41Sopenharmony_ci}); 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ciassert.throws(() => { 311cb0ef41Sopenharmony_ci new net.Socket().connect({}); 321cb0ef41Sopenharmony_ci}, { 331cb0ef41Sopenharmony_ci code: 'ERR_MISSING_ARGS', 341cb0ef41Sopenharmony_ci message: 'The "options" or "port" or "path" argument must be specified', 351cb0ef41Sopenharmony_ci}); 36