• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const assert = require('assert');
4const net = require('net');
5
6{
7  const fp = '/tmp/fadagagsdfgsdf';
8  const c = net.connect(fp);
9
10  c.on('connect', common.mustNotCall());
11  c.on('error', common.expectsError({
12    code: 'ENOENT',
13    message: `connect ENOENT ${fp}`
14  }));
15}
16
17{
18  assert.throws(
19    () => net.createConnection({ path: {} }),
20    { code: 'ERR_INVALID_ARG_TYPE' }
21  );
22}
23