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

chore(test): migrate to node:test #670

Merged
merged 4 commits into from
Mar 20, 2023
Merged

chore(test): migrate to node:test #670

merged 4 commits into from
Mar 20, 2023

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Feb 26, 2023

No description provided.

@targos
Copy link
Member

targos commented Feb 27, 2023

Segmentation fault (core dumped)

Interesting.

@aduh95
Copy link
Contributor Author

aduh95 commented Feb 27, 2023

Probably related to nodejs/node#46674

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

Probably related to nodejs/node#46674

I am pretty sure it is since node 16 is lacking many features of the test runner,
the mentioned PR simply adds the coverage to the output, it does not solve a bug

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

I was able to run on all three node versions in my branch:
aduh95/node-core-utils@node--test...MoLow:node-core-utils:node--test
the main 2 issues that are not supported on node 16 are
nodejs/node#45055
nodejs/node#45161

aduh95 and others added 2 commits March 15, 2023 20:59
Co-authored-by: Moshe Atlow <moshe@atlow.co.il>
@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

@aduh95 the tests pass but coverage can only be collected on node >= 18

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

I think it might be a fair mitigation to run tests without coverage on node 16

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 15, 2023

It looks like there are a few test failures on v18.x and v19.x though

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

yeah since node --test now runs files inside test/fixtures, I think running test-unit would have the same outcome as running test-all had before, unless I am missing something

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

@aduh95 this should work: aduh95@d7ea450

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.04 🎉

Comparison is base (1ad864e) 83.40% compared to head (b6e8de8) 83.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #670      +/-   ##
==========================================
+ Coverage   83.40%   83.45%   +0.04%     
==========================================
  Files          37       37              
  Lines        4146     4146              
==========================================
+ Hits         3458     3460       +2     
+ Misses        688      686       -2     

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 15, 2023

For some reason, CI picks up v18.15.0 only on Windows 🤔

@MoLow
Copy link
Member

MoLow commented Mar 15, 2023

@aduh95 seems like actions/setup-node@v3 should have check-latest: true

Copy link
Member

@MoLow MoLow left a comment

Choose a reason for hiding this comment

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

🎉

@aduh95 aduh95 marked this pull request as ready for review March 18, 2023 11:21
@MoLow
Copy link
Member

MoLow commented Mar 20, 2023

@aduh95 this requires amending the commit message(s)

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 20, 2023

No it doesn't, the title of the PR (which is what GitHub uses as the default commit message) is complying with Conventional Commit spec.

@MoLow
Copy link
Member

MoLow commented Mar 20, 2023

so this check should be fixed to only look at the PR name? https://github.com/nodejs/node-core-utils/actions/runs/4430791079/jobs/7772963001?pr=670

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 20, 2023

The issue is that some PR are being "Rebase and merge"d, in which case it makes sense to check every commits.

@aduh95 aduh95 merged commit cc4b11c into nodejs:main Mar 20, 2023
@aduh95 aduh95 deleted the node--test branch March 20, 2023 18:24
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.

3 participants