Skip to content
Myr

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 file

Take it

Added `req.host`TJ Holowaychukbefore adoption2b90cd7

lines 1–18why, one step back
1
2var express = require('../');34function req(ret) {5 return {6 get: function(){ return ret }7 , __proto__: express.request8 };9}1011describe('req', function(){12 describe('.host', function(){13 it('should return hostname', function(){14 req('example.com:3000').host.should.equal('example.com');15 req('example.com').host.should.equal('example.com');16 })17 })18})