mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 15:35:41 +00:00

PR-URL: https://github.com/nodejs/node/pull/17498 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
22 lines
408 B
JavaScript
22 lines
408 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const net = require('net');
|
|
|
|
{
|
|
const fp = '/tmp/fadagagsdfgsdf';
|
|
const c = net.connect(fp);
|
|
|
|
c.on('connect', common.mustNotCall());
|
|
c.on('error', common.expectsError({
|
|
code: 'ENOENT',
|
|
message: `connect ENOENT ${fp}`
|
|
}));
|
|
}
|
|
|
|
{
|
|
common.expectsError(
|
|
() => net.createConnection({ path: {} }),
|
|
{ code: 'ERR_INVALID_ARG_TYPE' }
|
|
);
|
|
}
|