-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
[v18.x backport] test_runner features #46839
Closed
MoLow
wants to merge
20
commits into
nodejs:v18.x-staging
from
MoLow:backport-v18-test-runner-reporters
Closed
[v18.x backport] test_runner features #46839
MoLow
wants to merge
20
commits into
nodejs:v18.x-staging
from
MoLow:backport-v18-test-runner-reporters
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes: nodejs#44612 PR-URL: nodejs#45264 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#45712 Fixes: nodejs#45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Move the logic for handling --test-reporter out of the general module loader and into the test_runner subsystem. PR-URL: nodejs#45923 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46030 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This commit updates the test runner to make the built in test reporters internal modules. PR-URL: nodejs#46092 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
Review requested:
|
nodejs-github-bot
added
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
v18.x
Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
labels
Feb 25, 2023
MoLow
changed the title
[v18.x backport] test_runner reporters
[v18.x backport] test_runner features
Feb 25, 2023
This commit adds code coverage functionality to the node:test module. When node:test is used in conjunction with the new --test-coverage CLI flag, a coverage report is created when the test runner finishes. The coverage summary is forwarded to any test runner reporters so that the display can be customized as desired. This new functionality is compatible with the existing NODE_V8_COVERAGE environment variable as well. There are still several limitations, which will be addressed in subsequent pull requests: - Coverage is only reported for a single process. It is possible to merge coverage reports together. Once this is done, the --test flag will be supported as well. - Source maps are not currently supported. - Excluding specific files or directories from the coverage report is not currently supported. Node core modules and node_modules/ are excluded though. PR-URL: nodejs#46017 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
MoLow
force-pushed
the
backport-v18-test-runner-reporters
branch
from
February 25, 2023 21:47
985157f
to
dd5e659
Compare
Add experimental to the name as requested during review. PR-URL: nodejs#46017 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: nodejs#46311 Fixes: nodejs#45836 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#46441 Fixes: nodejs#45910 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46450 Fixes: nodejs#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46056 Fixes: nodejs#46048 Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: nodejs#46544 Fixes: nodejs#46478 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#46440 Fixes: nodejs#45833 Refs: nodejs#45833 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#45736 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: nodejs#46651 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
The test runner relies on a few CLI options. That code was spread across a few locations. This commit centralizes that logic. PR-URL: nodejs#46707 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#46540 Fixes: nodejs#46448 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#46737 Fixes: nodejs#46747 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#46604 Fixes: nodejs#46562 Reviewed-By: Moshe Atlow <[email protected]>
The test runner is bootstrapped synchronously, with the exception of importing custom reporters. To better handle asynchronously throw errors, this commit introduces an internal error type that can be checked for from the test runner's uncaughtException handler. After nodejs#46707 and this change land, the other throw statement in the uncaughtException handler can be removed. This will allow the test runner to handle errors thrown from outside of tests (which currently prevents the test runner from reporting results). PR-URL: nodejs#46720 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
MoLow
force-pushed
the
backport-v18-test-runner-reporters
branch
from
February 25, 2023 21:55
dd5e659
to
b7aefcb
Compare
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Feb 25, 2023
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
PR-URL: #45736 Backport-PR-URL: #46839 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
PR-URL: #46651 Backport-PR-URL: #46839 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
The test runner relies on a few CLI options. That code was spread across a few locations. This commit centralizes that logic. PR-URL: #46707 Backport-PR-URL: #46839 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
PR-URL: #46540 Backport-PR-URL: #46839 Fixes: #46448 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
PR-URL: #46737 Backport-PR-URL: #46839 Fixes: #46747 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
PR-URL: #46604 Backport-PR-URL: #46839 Fixes: #46562 Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 3, 2023
The test runner is bootstrapped synchronously, with the exception of importing custom reporters. To better handle asynchronously throw errors, this commit introduces an internal error type that can be checked for from the test runner's uncaughtException handler. After #46707 and this change land, the other throw statement in the uncaughtException handler can be removed. This will allow the test runner to handle errors thrown from outside of tests (which currently prevents the test runner from reporting results). PR-URL: #46720 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Landed in 9434396...e17d857 🎉 |
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
Fixes: #44612 PR-URL: #45264 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #45712 Backport-PR-URL: #46839 Fixes: #45648 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
Move the logic for handling --test-reporter out of the general module loader and into the test_runner subsystem. PR-URL: #45923 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46030 Backport-PR-URL: #46839 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
This commit updates the test runner to make the built in test reporters internal modules. PR-URL: #46092 Backport-PR-URL: #46839 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
This commit adds code coverage functionality to the node:test module. When node:test is used in conjunction with the new --test-coverage CLI flag, a coverage report is created when the test runner finishes. The coverage summary is forwarded to any test runner reporters so that the display can be customized as desired. This new functionality is compatible with the existing NODE_V8_COVERAGE environment variable as well. There are still several limitations, which will be addressed in subsequent pull requests: - Coverage is only reported for a single process. It is possible to merge coverage reports together. Once this is done, the --test flag will be supported as well. - Source maps are not currently supported. - Excluding specific files or directories from the coverage report is not currently supported. Node core modules and node_modules/ are excluded though. PR-URL: #46017 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
Add experimental to the name as requested during review. PR-URL: #46017 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46311 Backport-PR-URL: #46839 Fixes: #45836 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46441 Backport-PR-URL: #46839 Fixes: #45910 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46450 Backport-PR-URL: #46839 Fixes: #45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46056 Backport-PR-URL: #46839 Fixes: #46048 Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46544 Backport-PR-URL: #46839 Fixes: #46478 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46440 Backport-PR-URL: #46839 Fixes: #45833 Refs: #45833 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #45736 Backport-PR-URL: #46839 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46651 Backport-PR-URL: #46839 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
The test runner relies on a few CLI options. That code was spread across a few locations. This commit centralizes that logic. PR-URL: #46707 Backport-PR-URL: #46839 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46540 Backport-PR-URL: #46839 Fixes: #46448 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46737 Backport-PR-URL: #46839 Fixes: #46747 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
PR-URL: #46604 Backport-PR-URL: #46839 Fixes: #46562 Reviewed-By: Moshe Atlow <[email protected]>
juanarbol
pushed a commit
that referenced
this pull request
Mar 5, 2023
The test runner is bootstrapped synchronously, with the exception of importing custom reporters. To better handle asynchronously throw errors, this commit introduces an internal error type that can be checked for from the test runner's uncaughtException handler. After #46707 and this change land, the other throw statement in the uncaughtException handler can be removed. This will allow the test runner to handle errors thrown from outside of tests (which currently prevents the test runner from reporting results). PR-URL: #46720 Backport-PR-URL: #46839 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
since these commits depend on each other and many of them don't land clearly - backporting these in bulk makes more sense