Skip to content

feat: add fakeTimers.fakeNodeBuiltins option - #11620

Closed
sheremet-va wants to merge 1 commit into
mainfrom
feat/fake-node-builtins
Closed

sheremet-va wants to merge 1 commit into
mainfrom
feat/fake-node-builtins

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

Adds fakeTimers.fakeNodeBuiltins (default false) to fake node:timers and node:timers/promises together with the global timers. ESM named imports are updated through syncBuiltinESMExports; vm pools also re-sync their synthetic builtin modules.

The module faking in the patched @sinonjs/fake-timers never ran before: the patch read __vitest_required__ at module scope, before Vitest assigns it.

Fixes #10871

@netlify

netlify Bot commented Oct 16, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit b7dffe8
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad22ccc9661167a70ca1823
😎 Deploy Preview https://deploy-preview-11620--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hi-ogawa

Copy link
Copy Markdown
Collaborator

@sheremet-va

Copy link
Copy Markdown
Member Author

Lol, I didn't notice, let's just keep yours 😄

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use fakeTimers does not mock imports from node:timers or node:timers/promises

2 participants