app.request.js
This file
Path
test/app.request.js
23 lines · 510 bytes · JavaScript
Last changed by
updated tests to use "supertest"TJ Holowaychukbefore adoption0f5560e
History of this fileTake it
123456789101112131415161718192021222324
var express = require('../') , request = require('./support/http');
describe('app', function(){ describe('.request', function(){ it('should extend the request prototype', function(done){ var app = express();
app.request.querystring = function(){ return require('url').parse(this.url).query; };
app.use(function(req, res){ res.end(req.querystring()); });
request(app) .get('/foo?name=tobi') .expect('name=tobi', done); }) })})