2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2016-12-30 18:38:06 -05:00
|
|
|
const common = require('../common');
|
|
|
|
const net = require('net');
|
2014-12-02 21:16:32 -06:00
|
|
|
|
2017-06-16 15:47:48 -04:00
|
|
|
{
|
|
|
|
const fp = '/tmp/fadagagsdfgsdf';
|
|
|
|
const c = net.connect(fp);
|
2014-12-02 21:16:32 -06:00
|
|
|
|
2017-06-16 15:47:48 -04:00
|
|
|
c.on('connect', common.mustNotCall());
|
|
|
|
c.on('error', common.expectsError({
|
|
|
|
code: 'ENOENT',
|
|
|
|
message: `connect ENOENT ${fp}`
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2017-12-06 22:16:44 +05:30
|
|
|
common.expectsError(
|
2017-06-16 15:47:48 -04:00
|
|
|
() => net.createConnection({ path: {} }),
|
2017-12-06 22:16:44 +05:30
|
|
|
{ code: 'ERR_INVALID_ARG_TYPE' }
|
2017-06-16 15:47:48 -04:00
|
|
|
);
|
|
|
|
}
|