mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
384 B
15 lines
384 B
10 years ago
|
'use strict';
|
||
8 years ago
|
const common = require('../common');
|
||
|
const net = require('net');
|
||
|
const assert = require('assert');
|
||
10 years ago
|
|
||
8 years ago
|
const c = net.createConnection(common.PORT);
|
||
10 years ago
|
|
||
8 years ago
|
c.on('connect', common.mustNotCall());
|
||
10 years ago
|
|
||
|
c.on('error', common.mustCall(function(e) {
|
||
8 years ago
|
assert.strictEqual(e.code, 'ECONNREFUSED');
|
||
|
assert.strictEqual(e.port, common.PORT);
|
||
|
assert.strictEqual(e.address, '127.0.0.1');
|
||
10 years ago
|
}));
|