-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
✅ add discarded middleware test #5819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Lets not merge anything more to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! but let's wait until we can merge it :)
|
condition meet, I will merge the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments to better demonstrate what I want to acheive.
| .expect(200, 'yee', function(err, res) { | ||
| if (err) return done(err); | ||
|
|
||
| router = new express.Router(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to replace the router, I want to completely remove it.
| }); | ||
|
|
||
| app.use(function (req, res, next) { | ||
| return router.handle(req, res, next); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To demonstrate the issue I am trying to address, replace
return router.handle(req, res, next);
with
console.log('I want to remove this'); return router.handle(req, res, next);
Is there a mechanism in this case to remove the console.log(...)?
No description provided.