Skip to content
Myr

naming capture groups

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 9141c64 · Browse files · 1 file+13 added−0 removed
This commit

State

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

Diff stats

1 file+13 added−0 removed

  • tests:+13 added−0 removed

1 file+13 added−0 removed

modified:test/app.router.js+13 added
230 unmodified lines
231 .get('/api/users/0.json')232 .expect('users/0 as json', done);233 })234 235 it('should allow naming', function(done){236 var app = express();237238 app.get('/api/:resource(*)', function(req, res){239 var resource = req.params.resource;240 res.end(resource);241 });242243 request(app)244 .get('/api/users/0.json')245 .expect('users/0.json', done);246 })247 248 it('should span multiple segments', function(done){249 var app = express();250251 app.get('/file/*', function(req, res){
99 unmodified lines