We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efc788a commit aa5dbb9Copy full SHA for aa5dbb9
test/app.router.js
@@ -191,8 +191,9 @@ describe('app.router', function(){
191
if (supportsRegexp('(?<foo>.*)')) {
192
it('should populate req.params with named captures', function(done){
193
var app = express();
194
+ var re = new RegExp('^/user/(?<userId>[0-9]+)/(view|edit)?$');
195
- app.get(/^\/user\/(?<userId>[0-9]+)\/(view|edit)?$/, function(req, res){
196
+ app.get(re, function(req, res){
197
var id = req.params.userId
198
, op = req.params[0];
199
res.end(op + 'ing user ' + id);
0 commit comments