test: updated promises.test.js re-added the plan() method#6057
test: updated promises.test.js re-added the plan() method#6057Eomm merged 6 commits intofastify:mainfrom
Conversation
f6a8c2b to
c588ae8
Compare
|
@Eomm as soon as you have time I wanted to ask you, for this PR what do I do, do I close it or do I need to update the PR? you see that the |
Signed-off-by: Antonio Tripodi <[email protected]>
|
This is not necessary in these tests, tap.plan behaves differently from what the node test runner does and is often mandatory. But this is ok to keep them even if there are not very useful, I kept them in other PRs I've done. |
|
Personally, I have you keep them on all the tests or take them off on all of them, if you start taking them off in one and in others you leave them, it doesn't make much sense. Those are rules you have to decide on the tests, so you also keep all the tests in the various repositories in order. There are in all the tests in the fastify organization repositories. If you follow stable rules, it is also easier for contributors to follow the rules. Think about it |
|
This is a pretty old and complex code base with a lot of different contributors on a long period time, there are no such strict rules and nobody want to waste time on it I think. |
|
I don't think you lose too much time, but just keep things in order, even if the tests are old and complex. I have updated this PR with the new modifcations so that |
1eba4e4 to
4ecf19b
Compare
Eomm
left a comment
There was a problem hiding this comment.
Sorry for being late, but LGMT
In general the plan helps developer to verify that we are not running more condition than expected. It helped many times catching wrong or missing return statements so I think it is a good practice adding it in general.
In this precise use case, I think the tests were small enough to remove them at that time, but having them is much better for sure!
Thanks
Checklist
npm run testandnpm run benchmarkand the Code of conduct
Proposal:
promises.test.jsre-added theplan()method 🔥