2017-01-06 04:46:12 -05:00
|
|
|
'use strict';
|
2017-03-24 09:46:44 -07:00
|
|
|
|
|
|
|
const common = require('../common');
|
2017-01-06 04:46:12 -05:00
|
|
|
const assert = require('assert');
|
|
|
|
const ClientRequest = require('http').ClientRequest;
|
|
|
|
|
|
|
|
{
|
2017-03-24 09:46:44 -07:00
|
|
|
const req = new ClientRequest({ createConnection: common.noop });
|
2017-01-06 04:46:12 -05:00
|
|
|
assert.strictEqual(req.path, '/');
|
|
|
|
assert.strictEqual(req.method, 'GET');
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2017-03-24 09:46:44 -07:00
|
|
|
const req = new ClientRequest({ method: '', createConnection: common.noop });
|
2017-01-06 04:46:12 -05:00
|
|
|
assert.strictEqual(req.path, '/');
|
|
|
|
assert.strictEqual(req.method, 'GET');
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2017-03-24 09:46:44 -07:00
|
|
|
const req = new ClientRequest({ path: '', createConnection: common.noop });
|
2017-01-06 04:46:12 -05:00
|
|
|
assert.strictEqual(req.path, '/');
|
|
|
|
assert.strictEqual(req.method, 'GET');
|
|
|
|
}
|