Skip to content

test_runner: mark mockTimers as stable - #55398

Closed
ErickWendel wants to merge 2 commits into
nodejs:mainfrom
ErickWendel:test-runner/promote-mock-timers-to-stable
Closed

test_runner: mark mockTimers as stable#55398
ErickWendel wants to merge 2 commits into
nodejs:mainfrom
ErickWendel:test-runner/promote-mock-timers-to-stable

Conversation

@ErickWendel

@ErickWendelErickWendel commented Oct 15, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-botnodejs-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
@codecov

codecovBot commented Oct 15, 2024

Copy link
Copy Markdown

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 linesCoverage Δ
lib/internal/test_runner/mock/mock_timers.js98.73% <ø> (-0.02%)⬇️

... and 38 files with indirect coverage changes

@avivkelleravivkeller 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
Comment threaddoc/api/test.md
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
@jakecastellijakecastelli added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 17, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ErickWendelErickWendel added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 17, 2024
@benjamingrbenjamingr 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-botnodejs-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
Copy Markdown
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 <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
nodejs-github-bot pushed a commit that referenced this pull request Oct 17, 2024
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
PR-URL: #55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
aduh95 pushed a commit that referenced this pull request Oct 19, 2024
PR-URL: #55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
aduh95 pushed a commit that referenced this pull request Oct 19, 2024
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
PR-URL: #55398
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
@ErickWendelErickWendel added the notable-change PRs with changes that should be highlighted in changelogs. label Oct 19, 2024
@github-actions

Copy link
Copy Markdown
Contributor

The notable-changePRs 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

ErickWendel commented Oct 19, 2024

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Member

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

@ErickWendel

ErickWendel commented Oct 21, 2024

Copy link
Copy Markdown
MemberAuthor

@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
@aduh95aduh95 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
@ruyadorno

Copy link
Copy Markdown
Member

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

@ruyadornoruyadorno added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label Nov 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.backport-requested-v22.xPRs awaiting manual backport to the v22.x-staging branch.commit-queue-rebaseAdd this label to allow the Commit Queue to land a PR in several commits.needs-ciPRs that need a full CI run.notable-changePRs with changes that should be highlighted in changelogs.test_runnerIssues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@ErickWendel@nodejs-github-bot@atlowChemi@ruyadorno@mcollina@cjihrig@MoLow@marco-ippolito@avivkeller@jakecastelli@benjamingr