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: mark mockTimers as stable #55398

Conversation

ErickWendel
Copy link
Member

@ErickWendel ErickWendel commented Oct 15, 2024

The MockTimers feature was introduced back in April 2023 on #47775 and had been receiving several fixes and improvements since then, currently there're no open issues.

@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 Oct 15, 2024
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.41%. Comparing base (2545b9e) to head (613f3cc).
Report is 283 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55398      +/-   ##
==========================================
- Coverage   88.42%   88.41%   -0.01%     
==========================================
  Files         652      652              
  Lines      186914   186911       -3     
  Branches    36077    36069       -8     
==========================================
- Hits       165277   165266      -11     
- Misses      14889    14897       +8     
  Partials     6748     6748              
Files with missing lines Coverage Δ
lib/internal/test_runner/mock/mock_timers.js 98.73% <ø> (-0.02%) ⬇️

... and 38 files with indirect coverage changes

@avivkeller avivkeller added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 16, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@nodejs-github-bot
Copy link
Collaborator

@jakecastelli jakecastelli added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@nodejs-github-bot
Copy link
Collaborator

@ErickWendel ErickWendel added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2024
@benjamingr benjamingr added commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 17, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2024
@nodejs-github-bot
Copy link
Collaborator

Landed in 142e405...0c68991

nodejs-github-bot pushed a commit that referenced this pull request Oct 17, 2024
PR-URL: #55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Oct 17, 2024
Signed-off-by: Erick Wendel <[email protected]>
PR-URL: #55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 19, 2024
PR-URL: #55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 19, 2024
Signed-off-by: Erick Wendel <[email protected]>
PR-URL: #55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
@ErickWendel ErickWendel added the notable-change PRs with changes that should be highlighted in changelogs. label Oct 19, 2024
Copy link
Contributor

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @ErickWendel.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

@ErickWendel
Copy link
Member Author

ErickWendel commented Oct 19, 2024

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @ErickWendel.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

MockTimers, introduced in April 2023, has just reached stable status. This API provides comprehensive support for mocking Dates and all major timers in Node.js, including setTimeout, setInterval, and setImmediate, both from the node:timers, node:timers/promises modules and global objects. After months of refinement, developers can now fully rely on MockTimers for testing time-based operations with confidence, ensuring better control over asynchronous behavior in their Node.js applications.

@atlowChemi
Copy link
Member

@ErickWendel I think we should also mention node:timers/promises as well, WDYT?

@ErickWendel
Copy link
Member Author

ErickWendel commented Oct 21, 2024

@ErickWendel I think we should also mention node:timers/promises as well, WDYT?

yes indeed! Just updated it! wdyt?

aduh95 added a commit that referenced this pull request Oct 24, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) #55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) #55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) #55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) #55398

PR-URL: TODO
@aduh95 aduh95 mentioned this pull request Oct 24, 2024
aduh95 added a commit that referenced this pull request Oct 24, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) #55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) #55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) #55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) #55398

PR-URL: #55513
aduh95 added a commit that referenced this pull request Oct 24, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) #55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) #55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) #55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) #55398

PR-URL: #55513
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Signed-off-by: Erick Wendel <[email protected]>
PR-URL: nodejs#55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) nodejs#54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) nodejs#55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) nodejs#55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) nodejs#55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) nodejs#55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) nodejs#55398

PR-URL: nodejs#55513
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
PR-URL: nodejs#55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Signed-off-by: Erick Wendel <[email protected]>
PR-URL: nodejs#55398
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) nodejs#54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) nodejs#55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) nodejs#55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) nodejs#55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) nodejs#55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) nodejs#55398

PR-URL: nodejs#55513
@ruyadorno
Copy link
Member

This commit does not land cleanly on v22.x-staging and will need manual backport in case we want it in v22.x.

@ruyadorno ruyadorno added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.