Skip to content
Myr

app.request.js

This file

Path

test/app.request.js

23 lines · 505 bytes · JavaScript

Last changed by

remove unnecessary test/support/httpJonathan Ongbefore adoption328c6d3

History of this file

Take it

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

pin jade dev dep so tests do not breakTJ Holowaychukbefore adoptiona10f695

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

remove unnecessary test/support/httpJonathan Ongbefore adoption328c6d3

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

pin jade dev dep so tests do not breakTJ Holowaychukbefore adoptiona10f695

lines 4–23why, one step back
4
5describe('app', function(){6 describe('.request', function(){7 it('should extend the request prototype', function(done){8 var app = express();910 app.request.querystring = function(){11 return require('url').parse(this.url).query;12 };1314 app.use(function(req, res){15 res.end(req.querystring());16 });1718 request(app)19 .get('/foo?name=tobi')20 .expect('name=tobi', done);21 })22 })23})