Skip to content
Myr

req.query.js

This file

Path

test/req.query.js

37 lines · 724 bytes · JavaScript

Last changed by

remove unnecessary test/support/httpJonathan Ongbefore adoption643397e

History of this file

Take it

The walk stopped after 200 commits: lines older than f41d09a point at it.

remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a

lines 1–2why, one step back
1
2var express = require('../')

remove unnecessary test/support/httpJonathan Ongbefore adoption643397e

line 3why, one step back
3 , request = require('supertest');

remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a

lines 4–20why, one step back
4
5describe('req', function(){6 describe('.query', function(){7 it('should default to {}', function(done){8 var app = express();910 app.use(function(req, res){11 req.query.should.eql({});12 res.end();13 });1415 request(app)16 .get('/')17 .end(function(res){18 done();19 });20 })

remove unnecessary test/support/httpJonathan Ongbefore adoption643397e

line 21why, one step back
21

remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a

lines 22–37why, one step back
22 it('should contain the parsed query-string', function(done){
23 var app = express();2425 app.use(function(req, res){26 req.query.should.eql({ user: { name: 'tj' }});27 res.end();28 });2930 request(app)31 .get('/?user[name]=tj')32 .end(function(res){33 done();34 });35 })36 })37})