docs(readme): use after() over ready() in example#157
docs(readme): use after() over ready() in example#157hungnb94 wants to merge 2 commits intofastify:mainfrom
after() over ready() in example#157Conversation
Use after instead of ready to run test Signed-off-by: hungnb94 <hungnb94@gmail.com>
after() over ready() in example
|
There is also wrong variable name in the example. -fastify.register(fastifySchedulePlugin);
+fastify.register(fastifySchedule); |
You're right. I'm going to update PR now. |
(cherry picked from commit b83f7c4)
|
@hungnb94, the unit tests in this repo use |
You can check branch dev here: https://github.com/hungnb94/fastify-demo/tree/dev |
| // Therefore, you need to call `after` method. | ||
| fastify.after().then(() => { |
There was a problem hiding this comment.
These have very different meanings:
Eomm
left a comment
There was a problem hiding this comment.
I think we discussed to remove the after() method to sponsor more the promise-way of doing it.
So we should remove it from docs example instead
This PR addresses an issue where using the
readymethod causes the application to get stuck when running unit tests. To resolve this, theaftermethod is used instead, ensuring that the necessary logic is executed without blocking the test execution.Changes:
Reason for Change:
Testing: