11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst net = require('net'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci{ 71cb0ef41Sopenharmony_ci const fp = '/tmp/fadagagsdfgsdf'; 81cb0ef41Sopenharmony_ci const c = net.connect(fp); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci c.on('connect', common.mustNotCall()); 111cb0ef41Sopenharmony_ci c.on('error', common.expectsError({ 121cb0ef41Sopenharmony_ci code: 'ENOENT', 131cb0ef41Sopenharmony_ci message: `connect ENOENT ${fp}` 141cb0ef41Sopenharmony_ci })); 151cb0ef41Sopenharmony_ci} 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci{ 181cb0ef41Sopenharmony_ci assert.throws( 191cb0ef41Sopenharmony_ci () => net.createConnection({ path: {} }), 201cb0ef41Sopenharmony_ci { code: 'ERR_INVALID_ARG_TYPE' } 211cb0ef41Sopenharmony_ci ); 221cb0ef41Sopenharmony_ci} 23