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