Skip to content
Myr

Fix the behavior for setting up routes with * in them.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ctide · committed by Tj Holowaychuk · parent 1f520f9 · Browse files · 2 files+14 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+14 added−2 removed

  • tests:+13 added−1 removed
  • other:+1 added−1 removed

2 files+14 added−2 removed

modified:lib/router/route.js+1 added-1 removed
modified:test/router.test.js+13 added-1 removed
136 unmodified lines
137 { url: '/user/ab' },138 { body: 'Cannot GET /user/ab' });139 },140 141 'test that * operates correctly': function(){142 var app = express.createServer();143 144 app.get('/admin*', function(req, res){145 res.send(200);146 });147 148 assert.response(app,149 { url: '/admin', },150 { status: 200 });151 },152 153 'test app.param()': function(){154 var app = express.createServer();155 156 var users = [
68 unmodified lines
225 assert.response(app,226 { url: '/user/12', method: 'OPTIONS' },227 { headers: { Allow: 'GET,PUT' }});228 },217 229230 'test app.lookup': function(){231 var app = express.createServer();232 app.get('/user', function(){});233 app.get('/user/:id', function(){});
186 unmodified lines