| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,24 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | + const ClientRequest = require('http').ClientRequest; | ||
| 5 | + | ||
| 6 | + function noop() {} | ||
| 7 | + | ||
| 8 | + { | ||
| 9 | + const req = new ClientRequest({ createConnection: noop }); | ||
| 10 | + assert.strictEqual(req.path, '/'); | ||
| 11 | + assert.strictEqual(req.method, 'GET'); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + { | ||
| 15 | + const req = new ClientRequest({ method: '', createConnection: noop }); | ||
| 16 | + assert.strictEqual(req.path, '/'); | ||
| 17 | + assert.strictEqual(req.method, 'GET'); | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + { | ||
| 21 | + const req = new ClientRequest({ path: '', createConnection: noop }); | ||
| 22 | + assert.strictEqual(req.path, '/'); | ||
| 23 | + assert.strictEqual(req.method, 'GET'); | ||
| 24 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments