test_runner: make it compatible with fake timers#59272
test_runner: make it compatible with fake timers#59272mcollina wants to merge 2 commits intonodejs:mainfrom
Conversation
|
Review requested:
|
|
Can you please add a test? |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #59272 +/- ##
=======================================
Coverage 89.64% 89.65%
=======================================
Files 676 676
Lines 206249 206326 +77
Branches 39518 39529 +11
=======================================
+ Hits 184892 184974 +82
+ Misses 13479 13474 -5
Partials 7878 7878
π New features to boost your workflow:
|
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
494d33b to
2779c84
Compare
|
This has disappeared (there seems to be an on-going issue related to this). |
Commit Queue failed- Loading data for nodejs/node/pull/59272 β Done loading data for nodejs/node/pull/59272 ----------------------------------- PR info ------------------------------------ Title test_runner: make it compatible with fake timers (#59272) Author Matteo Collina <matteo.collina@gmail.com> (@mcollina) Branch mcollina:compatibility-with-fake-timers -> nodejs:main Labels author ready, needs-ci, test_runner Commits 2 - test_runner: make it compatible with fake timers - test_runner: add test for fake timers compatibility with timeout Committers 1 - Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/59272 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Paolo Insogna <paolo@cowtech.it> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/59272 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Paolo Insogna <paolo@cowtech.it> -------------------------------------------------------------------------------- βΉ This PR was created on Tue, 29 Jul 2025 09:46:09 GMT β Approvals: 5 β - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/59272#pullrequestreview-3068494804 β - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/59272#pullrequestreview-3069013804 β - Moshe Atlow (@MoLow): https://github.com/nodejs/node/pull/59272#pullrequestreview-3105248861 β - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/59272#pullrequestreview-3971839550 β - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/59272#pullrequestreview-3904476398 β Last GitHub CI successful βΉ Last Full PR CI on 2026-03-10T14:43:23Z: https://ci.nodejs.org/job/node-test-pull-request/71661/ - Querying data for job/node-test-pull-request/71661/ β Build data downloaded β Last Jenkins CI successful -------------------------------------------------------------------------------- β No git cherry-pick in progress β No git am in progress β No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD β origin/main is now up-to-date - Downloading patch for 59272 From https://github.com/nodejs/node * branch refs/pull/59272/merge -> FETCH_HEAD β Fetched commits as f68824a6805a..2779c84ba2f3 -------------------------------------------------------------------------------- [main 18611378d4] test_runner: make it compatible with fake timers Author: Matteo Collina <hello@matteocollina.com> Date: Tue Jul 29 11:44:47 2025 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [main a80d665aa6] test_runner: add test for fake timers compatibility with timeout Author: Matteo Collina <hello@matteocollina.com> Date: Wed Mar 4 15:59:18 2026 +0100 2 files changed, 57 insertions(+) create mode 100644 test/fixtures/test-runner/mock-timers-with-timeout.js create mode 100644 test/parallel/test-runner-mock-timers-with-timeout.js β Patches applied There are 2 commits in the PR. Attempting autorebase. (node:350) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use `node --trace-deprecation ...` to show where the warning was created) Rebasing (2/4) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- test_runner: make it compatible with fake timershttps://github.com/nodejs/node/actions/runs/23274294427 |
If
setTimeoutis monkey-patched, it might be missing the symbol. Moreover, we plan to remove it in the future anyway in #58689.