-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: handle missing route options #236
Conversation
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 am unable to reproduce the bug from the repository you linked in the issue.
You should first write a test that fails in order to prove the existence of the bug, then write the fix that make it pass.
Please check fastify version. It should be 4.0.0-4.22.0 to reproduce the bug. I can't write tests because of it. |
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
I think it is possible to run versioned tests in a child process, but I am not sure that this is something we usually do. |
It could be useful, but I'm not sure too. Usually I'm doing this with docker-compose, but I it requires changes in CI pipeline. |
Yeah #228 was breaking for v8 (Fastify v4 line) actually, it should have considered the then-deprecated setting as well instead of just changing to routeOptions |
Can we merge this? |
Fixes #232
in fastify < 4.10 req in onRequest hook didn't have
routeOptions
at all - PRin fastify < 4.23
routeOptions
didn't haveconfig
property - PRI handled both cases to keep compatibility, but I don't know how add tests for it. Do you have any suggestions?
Checklist
npm run test
andnpm run benchmark
and the Code of conduct