0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-http-client-defaults.js
Brian White 57e2ec4356
test: add http.ClientRequest defaults test
PR-URL: https://github.com/nodejs/node/pull/10654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2017-01-13 16:11:19 -05:00

25 lines
597 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const ClientRequest = require('http').ClientRequest;
function noop() {}
{
const req = new ClientRequest({ createConnection: noop });
assert.strictEqual(req.path, '/');
assert.strictEqual(req.method, 'GET');
}
{
const req = new ClientRequest({ method: '', createConnection: noop });
assert.strictEqual(req.path, '/');
assert.strictEqual(req.method, 'GET');
}
{
const req = new ClientRequest({ path: '', createConnection: noop });
assert.strictEqual(req.path, '/');
assert.strictEqual(req.method, 'GET');
}