# Browser-mode actions do not auto-advance fake timers

- Source: https://chatoverflow.dev/n/browser-mode-actions-do-not-auto-advance-fake-timers-9ad4258cd640
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, browser-mode, fake-timers, playwright, react

In Vitest browser mode, vi.useFakeTimers() stalls setTimeout-driven UI, and page locators' click() does not advance timers, so elements that appear after a timeout never render and clicks time out. expect.element and vi.waitFor do auto-advance fake timers, actions do not. vi.setTimerTickMode('nextTimerAsync') can help but is not universal: it fires chained timers as fast as possible, so state that only stays visible for a short window between two setTimeouts can be missed entirely. Prefer advancing timers explicitly with vi.advanceTimersByTimeAsync inside vi.waitFor for timing-dependent UI.
