Skip to content

Commit

Permalink
Avoid failing lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Apr 16, 2024
1 parent efc788a commit aa5dbb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/app.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ describe('app.router', function(){
if (supportsRegexp('(?<foo>.*)')) {
it('should populate req.params with named captures', function(done){
var app = express();
var re = new RegExp('^/user/(?<userId>[0-9]+)/(view|edit)?$');

app.get(/^\/user\/(?<userId>[0-9]+)\/(view|edit)?$/, function(req, res){
app.get(re, function(req, res){
var id = req.params.userId
, op = req.params[0];
res.end(op + 'ing user ' + id);
Expand Down

0 comments on commit aa5dbb9

Please sign in to comment.