Skip to content
Myr

req.route.js

This file

Path

test/req.route.js

25 lines · 576 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 34c83d7 point at it.

3.4.7Jonathan Ongbefore adoption34c83d7

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');

3.4.7Jonathan Ongbefore adoption34c83d7

lines 4–13why, one step back
4
5describe('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 });

remove unnecessary test/support/httpJonathan Ongbefore adoption643397e

line 14why, one step back
14

3.4.7Jonathan Ongbefore adoption34c83d7

lines 15–25why, one step back
15 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})