Skip to content

Commit aa5dbb9

Browse files
committed
Avoid failing lint
1 parent efc788a commit aa5dbb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/app.router.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ describe('app.router', function(){
191191
if (supportsRegexp('(?<foo>.*)')) {
192192
it('should populate req.params with named captures', function(done){
193193
var app = express();
194+
var re = new RegExp('^/user/(?<userId>[0-9]+)/(view|edit)?$');
194195

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

0 commit comments

Comments
 (0)