req.route.js
This file
Path
test/req.route.js
25 lines · 576 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 6bc7574 point at it.
docs: typo fixesDouglas Christopher Wilsonbefore adoption6bc7574
lines 1–25why, one step back12var express = require('../')3 , request = require('supertest');45describe('req', function(){6 describe('.route', function(){7 it('should be the executed Route', function(done){8 var app = express();910 app.get('/user/:id/:op?', function(req, res, next){11 req.route.path.should.equal('/user/:id/:op?');12 next();13 });1415 app.get('/user/:id/edit', function(req, res){16 req.route.path.should.equal('/user/:id/edit');17 res.end();18 });1920 request(app)21 .get('/user/12/edit')22 .expect(200, done);23 })24 })25})