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_runner: add coverage support to run function #53937

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atlowChemi
Copy link
Member

@atlowChemi atlowChemi commented Jul 19, 2024

Fixes: #53867
Refs: #53924

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jul 19, 2024
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Left a couple comments regarding a possible longer term strategy, but this is looking good. Thank you for picking this up!

lib/internal/test_runner/harness.js Outdated Show resolved Hide resolved
lib/internal/test_runner/runner.js Outdated Show resolved Hide resolved
lib/internal/test_runner/runner.js Outdated Show resolved Hide resolved
doc/api/test.md Outdated Show resolved Hide resolved
doc/api/test.md Outdated Show resolved Hide resolved
doc/api/test.md Outdated Show resolved Hide resolved
doc/api/test.md Outdated Show resolved Hide resolved
@atlowChemi atlowChemi force-pushed the coverage-support-via-run branch 3 times, most recently from 2907841 to 7ef36f2 Compare July 29, 2024 18:35
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

I think these changes are moving in the right direction, but I think this should be split up into multiple PRs.

lib/internal/main/test_runner.js Outdated Show resolved Hide resolved
lib/internal/test_runner/harness.js Outdated Show resolved Hide resolved
lib/internal/test_runner/harness.js Outdated Show resolved Hide resolved
lib/internal/test_runner/harness.js Outdated Show resolved Hide resolved
lib/internal/test_runner/harness.js Outdated Show resolved Hide resolved
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
test/parallel/test-runner-run.mjs Outdated Show resolved Hide resolved
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
@cjihrig
Copy link
Contributor

cjihrig commented Aug 22, 2024

@atlowChemi just a heads up if you come back to this PR - there will likely be new flags to account for from #54429. A lot of internal refactoring also happened, so the diff here should be a lot simpler.

@RedYetiDev RedYetiDev added wip Issues and PRs that are still a work in progress. coverage Issues and PRs related to native coverage support. labels Aug 22, 2024
@atlowChemi
Copy link
Member Author

@atlowChemi just a heads up if you come back to this PR - there will likely be new flags to account for from #54429. A lot of internal refactoring also happened, so the diff here should be a lot simpler.

@cjihrig Thanks for the heads up!

I am trying yo get back to this, been pretty busy in work & personal life lately, hoping to get back to this soon 🙏🏽

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Other than docs, this looks pretty much done!

@atlowChemi

This comment was marked as resolved.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 30, 2024

I have some issues with the tests

Do @RedYetiDev's comments make a difference? If they still fail with those changes, I can take a look.

@atlowChemi
Copy link
Member Author

I have some issues with the tests

Do @RedYetiDev's comments make a difference? If they still fail with those changes, I can take a look.

They do! Thanks @RedYetiDev 🙂
I actually noticed it just after I wrote here seeking for help, but took some time to get to it..

@atlowChemi atlowChemi marked this pull request as ready for review September 5, 2024 05:03
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 46.75325% with 41 lines in your changes missing coverage. Please review.

Project coverage is 87.59%. Comparing base (dc74f17) to head (ffe1e56).

Files with missing lines Patch % Lines
lib/internal/test_runner/runner.js 46.75% 41 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #53937      +/-   ##
==========================================
- Coverage   87.61%   87.59%   -0.02%     
==========================================
  Files         650      650              
  Lines      182938   183014      +76     
  Branches    35390    35418      +28     
==========================================
+ Hits       160274   160315      +41     
- Misses      15927    15962      +35     
  Partials     6737     6737              
Files with missing lines Coverage Δ
lib/internal/test_runner/runner.js 84.05% <46.75%> (-3.85%) ⬇️

... and 29 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coverage Issues and PRs related to native coverage support. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_runner: do not read from process.argv and process.cwd() in run()
5 participants