Skip to content
Myr

Fix using same param name in array of paths

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

fixes #2389

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent efd2dfb · Browse files · 3 files+34 added−4 removed
This commit

State

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

Diff stats

3 files+34 added−4 removed

  • tests:+17 added−0 removed
  • other:+17 added−4 removed

3 files+34 added−4 removed

modified:lib/router/layer.js+12 added-4 removed
modified:test/app.router.js+17 added
677 unmodified lines
678 request(app)679 .get('/user/tj/edit')680 .expect('editing tj', done);681 })682683 it('should work in array of paths', function(done){684 var app = express();685 var cb = after(2, done);686687 app.get(['/user/:user/poke', '/user/:user/pokes'], function(req, res){688 res.end('poking ' + req.params.user);689 });690691 request(app)692 .get('/user/tj/poke')693 .expect('poking tj', cb);694695 request(app)696 .get('/user/tj/pokes')697 .expect('poking tj', cb);698 })699 })700701 describe(':name?', function(){702 it('should denote an optional capture group', function(done){
243 unmodified lines
modified:History.md+5 added
1unreleased2==========34 * Fix using same param name in array of paths564.9.6 / 2014-10-087==================89 * deps: accepts@~1.1.1
2331 unmodified lines