fix some test formatting

This commit is contained in:
TJ Holowaychuk 2015-10-02 18:49:20 -07:00
parent 2359b6a769
commit 1ed691dde3
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,8 @@ describe('req.ip', function(){
req.socket.remoteAddress = '127.0.0.2'; req.socket.remoteAddress = '127.0.0.2';
req.ip.should.equal('127.0.0.2'); req.ip.should.equal('127.0.0.2');
}) })
describe('with req.socket.remoteAddress not present', function() {
describe('with req.socket.remoteAddress not present', function(){
it('should return an empty string', function(){ it('should return an empty string', function(){
var req = request(); var req = request();
req.socket.remoteAddress = null; req.socket.remoteAddress = null;

View file

@ -2,12 +2,13 @@
var context = require('../context'); var context = require('../context');
describe('ctx.querystring', function(){ describe('ctx.querystring', function(){
it('should return the querystring', function () { it('should return the querystring', function(){
var ctx = context({ url: '/store/shoes?page=2&color=blue' }); var ctx = context({ url: '/store/shoes?page=2&color=blue' });
ctx.querystring.should.equal('page=2&color=blue'); ctx.querystring.should.equal('page=2&color=blue');
}) })
describe('when ctx.req not present', function() {
it('should return an empty string', function (){ describe('when ctx.req not present', function(){
it('should return an empty string', function(){
var ctx = context(); var ctx = context();
ctx.request.req = null; ctx.request.req = null;
ctx.querystring.should.equal(''); ctx.querystring.should.equal('');