-
-
Notifications
You must be signed in to change notification settings - Fork 32k
test_runner: improve mock timer promisifiers #58824
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
Open
Renegade334
wants to merge
2
commits into
nodejs:main
Choose a base branch
from
Renegade334:mock-timers-improve-promisifiers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
test_runner: improve mock timer promisifiers #58824
Renegade334
wants to merge
2
commits into
nodejs:main
from
Renegade334:mock-timers-improve-promisifiers
+79
−77
Conversation
This file contains hidden or 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
Review requested:
|
* yield from loop instead of setting up custom iterator * cancel abort listener on exit * do not call <Array>.at(0)
8514444
to
d28af81
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58824 +/- ##
==========================================
- Coverage 90.10% 90.08% -0.02%
==========================================
Files 640 640
Lines 188384 188350 -34
Branches 36937 36935 -2
==========================================
- Hits 169743 169677 -66
- Misses 11363 11395 +32
Partials 7278 7278
🚀 New features to boost your workflow:
|
atlowChemi
approved these changes
Jun 29, 2025
This comment was marked as outdated.
This comment was marked as outdated.
Could this please get commit-queue-squash and dont-land-on-v20.x? |
jasnell
approved these changes
Jun 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
commit-queue-squash
Add this label to instruct the Commit Queue to squash all the PR commits into the first one.
dont-land-on-v20.x
PRs that should not land on the v20.x-staging branch and should not be released in v20.x.
needs-ci
PRs that need a full CI run.
test_runner
Issues and PRs related to the test runner subsystem.
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.
Add some cleanup logic to
#setIntervalPromisified
and#promisifyTimer
to remove the abort listener when the timer either resolves or throws.Also makes some structural simplifications to both methods. In particular, the previous implementation of
#setIntervalPromisified
created a single-use anonymous async iterator, beforeyield*
ing from it; this can trivially be converted to yielding from afor await
loop.Needs dont-land-on-v20.x for
Promise.withResolvers
.