Skip to content

test_runner: make it compatible with fake timers#59272

Open
mcollina wants to merge 2 commits intonodejs:mainfrom
mcollina:compatibility-with-fake-timers
Open

test_runner: make it compatible with fake timers#59272
mcollina wants to merge 2 commits intonodejs:mainfrom
mcollina:compatibility-with-fake-timers

Conversation

@mcollina
Copy link
Member

If setTimeout is monkey-patched, it might be missing the symbol. Moreover, we plan to remove it in the future anyway in #58689.

@mcollina mcollina requested a review from rluvaton July 29, 2025 09:46
@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 Jul 29, 2025
@rluvaton
Copy link
Member

Can you please add a test?

@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (e78bf55) to head (2779c84).
⚠️ Report is 26 commits behind head on main.

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           
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 96.80% <100.00%> (ø)

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 Jan 3, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 3, 2026
@nodejs-github-bot
Copy link
Collaborator

mcollina added 2 commits March 3, 2026 23:06
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina force-pushed the compatibility-with-fake-timers branch from 494d33b to 2779c84 Compare March 4, 2026 14:59
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. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants