Skip to content

test_runner: make it compatible with fake timers #59272

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
wants to merge 1 commit into
base: main
Choose a base branch
from

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?

Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.99%. Comparing base (2204587) to head (494d33b).
⚠️ Report is 748 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59272      +/-   ##
==========================================
- Coverage   90.24%   89.99%   -0.26%     
==========================================
  Files         630      649      +19     
  Lines      185688   192130    +6442     
  Branches    36403    37651    +1248     
==========================================
+ Hits       167569   172900    +5331     
- Misses      10997    11850     +853     
- Partials     7122     7380     +258     
Files with missing lines Coverage Δ
lib/internal/test_runner/test.js 97.37% <100.00%> (+0.04%) ⬆️

... and 316 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants