chore: Migrate to node:test #5714
Conversation
c4511c1 to
fc8e055
Compare
First, there isn't "a transition" as an overall ecosystem. If a project wants to do that, it is certainly within their purview. But Regarding the plan for doing so in this repository, please review #5683 (comment). We are not ready for converting individual test suites at this time. There is some prep-work that needs to be done first. |
I have no idea what you mean by that.
i don't remember saying it is...
So should I close this PR? as I see it its probably not relevant |
I read the statement as referring to some overall conversion across the ecosystem, not as specific to the Fastify project. There isn't a reference to an issue (e.g. #5555), nor any mention of "Fastify" in it. So I want to be clear that we are not advocating for anyone to migrate from
No. We just need a different PR to land before this on in this repo, in my opinion. |
Forgive me, I thought it's obvious that I'm referring to |
|
recent changes:
|
|
I think its best that I convert this PR to a draft and keep working on it, a couple of files at a time... |
Does that mean you intend to convert all files in this one PR? |
I think having all the files in one PR is too much as I said. If you want one PR that's also fine, it's just going to take me some time to change all the files... Let me know what you think. |
|
I'm just trying to understand your plan. I would not be in favor of converting everything in one PR. It would take too long and be too difficult to keep synchronized with ongoing changes from other PRs. |
My plan is to try and add more files until you guys decide whether or not you want it to be in one PR or more. |
|
Once #5720 lands, we will not need to convert everything in a single PR. The single PR suggestion is one that attempts to avoid issues with running the tests, in my opinion. I want to see multiple PRs because:
|
|
I agree. |
|
Yes, thank you. |
|
Opened this PR for a review again after #5720 merged. |
|
I just saw that this PR is 51 changed files. This is going to take a long time to review. In the future, let's keep it to ~5 files at a time. |
jsumners
left a comment
There was a problem hiding this comment.
Thank you for all of the work.
Happy to help. What's the best way to add more files? should I keep this branch and open a different PR? or should I just create a new branch? |
|
All PRs should branch off the current main (or target release line branch). So please open a new PR that starts from the current main. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
These change are related to the issue #5555
Recently I have been working on the transition from
taptonode:test.At first, I thought of combining all the tests and creating one PR, but I realized it was too much. First of all, because these are a lot of files, second, it is better if you take a look and say what you think about some of the changes before I continue to other files. If there is any feedback, it may have to be implemented in the following files.
So, I created this PR, with a sample of the files I changed, to get feedback, hoping that from here I'll get confirmation that I'm in the right direction, and from there we'll move on to the rest of the files.
It is important for me to emphasize that my approach in the implementation was to keep the integration as simple as possible, that is - not to change the logic of the test itself but only what is necessary so that the result of the test, and its behavior, will remain the same as it was.
This is also the approach that everyone who will work on this must adopt. I don't think we should be tempted to change tests or add stuff.
But the gradual change I propose can only be applied if it's possible to run all the tests together, without migrating completely to
node:test. runningnpm run uniton my side worked and it seems liketapcan handle migrated files.I admit that I don't know tap in depth so I won't be able to know for sure if it's okay.
so let me know what you think of the changes. If it's good enough, I can continue to other files.
Then, we have to decide whether to merge and continue to more files in a separate PR.
If the changes are acceptable but you still want everything to be done in one PR.
I will continue to make changes to the following files in a similar way to what I did here, but it will take time to change all the files.
Personally, I think changing all files at once is way too much.
Checklist
npm run testandnpm run benchmarkand the Code of conduct