blob: 3817dbb92ff1e250ea995937ec275d06e3646318 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
var common = require('../common');
var net = require('net');
var assert = require('assert');
var c = net.createConnection(common.PORT, 'blah.blah');
c.on('connect', assert.fail);
c.on('error', common.mustCall(function(e) {
assert.equal(e.code, 'ENOTFOUND');
assert.equal(e.port, common.PORT);
assert.equal(e.hostname, 'blah.blah');
}));
|