req.host.js
This file
Path
test/req.host.js
18 lines · 383 bytes · JavaScript
Last changed by
Added `req.host`TJ Holowaychukbefore adoption2b90cd7
History of this fileTake it
12345678910111213141516171819
var express = require('../');
function req(ret) { return { get: function(){ return ret } , __proto__: express.request };}
describe('req', function(){ describe('.host', function(){ it('should return hostname', function(){ req('example.com:3000').host.should.equal('example.com'); req('example.com').host.should.equal('example.com'); }) })})