-
Notifications
You must be signed in to change notification settings - Fork 177
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
Improve path checking before route registration #155
Conversation
@wengeezhang @etroynov kindly review once you find some time in your busy schedules |
@3imed-jaberi @niftylettuce can you review it? |
I also recommend you change the title, because someone may not understand that PR is about a specific issue. It could be something like: and add in description: p.s thx for your help. |
…ible method verbs are tested
@etroynov should be done, I've also improved on the verb specific test by running it against all methods exported in the methods module used by the router, let me know if you agree with that approach. Ps: No worries, happy to help :) |
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.
You could probably move those checks to a function isValidPath
instead but otherwise looks alright. 👍🏻
We have just published https://github.com/koajs/router/releases/tag/v11.0.0 This project is maintained by Forward Email and Lad. |
@SagnikPradhan Agree :). I'll take a look either tonight or tomorrow to move those bits into utility functions, there's some other parts of the validation which could use some abstraction to ensure code readability, of course I'll write some tests for any PR I open, thanks for the tip :). |
@titanism awesome! I'll regularly check in and chip in where possible, we're heavy users of koa and koa-router and would want to help maintain :) |
Checklist
fixes: #147, #148