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.
13 lines
352 B
13 lines
352 B
8 years ago
|
'use strict';
|
||
|
|
||
|
// Make sure http.request() can catch immediate errors in
|
||
|
// net.createConnection().
|
||
|
|
||
|
const common = require('../common');
|
||
|
const assert = require('assert');
|
||
|
const http = require('http');
|
||
|
const req = http.get({ host: '127.0.0.1', port: 1 });
|
||
|
req.on('error', common.mustCall((err) => {
|
||
|
assert.strictEqual(err.code, 'ECONNREFUSED');
|
||
|
}));
|