Skip to content
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

Add await to deterministically finish registering with fastify #628

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsschneidermann
Copy link

Closes #627

Impact to users should be negligeble. If they weren't awaiting their own fastify.register call, then there is no behavior difference. If they are awaiting their fastify.register call, they were probably expecting the routes to be loaded and ready right after.

Alternative solution, branch the code and only perform the await based on some new opt-in option.

Should I look at impact to this projects tests?

@seriousme
Copy link
Owner

If you run npm run test it will automatically reformat the code and run the tests.

@dsschneidermann
Copy link
Author

If you run npm run test it will automatically reformat the code and run the tests.

Done so. It also auto-updated the example project dependency, so I kept it as a separate commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to ensure fastify routes are loaded during setup in unit-testing
2 participants