0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-net-better-error-messages-path.js
Vse Mozhet Byt 8b76c3e60c test: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12735
Refs: https://github.com/nodejs/node/pull/12455
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-05 17:39:05 +03:00

14 lines
361 B
JavaScript

'use strict';
const common = require('../common');
const net = require('net');
const assert = require('assert');
const fp = '/tmp/fadagagsdfgsdf';
const c = net.connect(fp);
c.on('connect', common.mustNotCall());
c.on('error', common.mustCall(function(e) {
assert.strictEqual(e.code, 'ENOENT');
assert.strictEqual(e.message, `connect ENOENT ${fp}`);
}));