Skip to content

fix: advance fake timers with expect.poll interval#10022

Merged
sheremet-va merged 1 commit intovitest-dev:mainfrom
hi-ogawa:fix/expect-poll-fake-timers
Mar 30, 2026
Merged

fix: advance fake timers with expect.poll interval#10022
sheremet-va merged 1 commit intovitest-dev:mainfrom
hi-ogawa:fix/expect-poll-fake-timers

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented Mar 30, 2026

Description

This fix is fine as alignment with waitFor/waitUntil, but I wonder if we should encourage setTimerTickMode("nextTimerAsync") in the future.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Fixes vitest-dev#10020

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hi-ogawa hi-ogawa changed the title fix(expect): advance fake timers with expect.poll internal fix(expect): advance fake timers with expect.poll interval Mar 30, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e265e18
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69c9e20835f4a00008f8ef77
😎 Deploy Preview https://deploy-preview-10022--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@hi-ogawa hi-ogawa changed the title fix(expect): advance fake timers with expect.poll interval fix: advance fake timers with expect.poll interval Mar 30, 2026
@hi-ogawa hi-ogawa marked this pull request as ready for review March 30, 2026 03:01
@sheremet-va sheremet-va merged commit 3f5bfa3 into vitest-dev:main Mar 30, 2026
15 of 16 checks passed
@hi-ogawa hi-ogawa deleted the fix/expect-poll-fake-timers branch March 30, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expect.poll does not work with fake timers

2 participants