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

test: migrate tests to use node:test module for better test structure for report worker #56038

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mertcanaltin
Copy link
Member

Refactored report-worker tests to use the node:test module for better structure and consistency.

this is part of a long pull request: #56024

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. report Issues and PRs related to process.report. test Issues and PRs related to the tests. labels Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.99%. Comparing base (9029aec) to head (d634665).
Report is 179 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56038      +/-   ##
==========================================
+ Coverage   87.95%   87.99%   +0.04%     
==========================================
  Files         656      656              
  Lines      188372   189103     +731     
  Branches    35979    36003      +24     
==========================================
+ Hits       165687   166409     +722     
- Misses      15851    15858       +7     
- Partials     6834     6836       +2     

see 59 files with indirect coverage changes

Comment on lines 11 to 12
test('Worker threads report basic information', async (t) => {
await t.test('should include basic information about Worker threads', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could we also use describe/it to avoid using await t.test?

Not entirely sure about this: could we set concurrency: true, or is sequentiality needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed what you said, thank you, the test is more readable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope I understood correctly, when I used --test-concurrency I saw that the tests were successfully synchronized

@mertcanaltin mertcanaltin added the blocked PRs that are blocked by other issues or PRs. label Dec 24, 2024
@mertcanaltin
Copy link
Member Author

#54796, #56027, #55716
I added a blocker tag because it is linked

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm blocking this because there is an approval now and as discussed in other places this is not an improvement in my opinion. I will remove the block once TSC officially decides that a mass refactor to node:test is good for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. needs-ci PRs that need a full CI run. report Issues and PRs related to process.report. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants