chore(deps-dev): bump the vitest group with 4 updates#7673
chore(deps-dev): bump the vitest group with 4 updates#7673francinelucca merged 2 commits intodependabot/npm_and_yarn/vitest-d24016cca7from
Conversation
|
@copilot implement this |
…ser tests Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Implemented in commit The fix changes both Root cause: All 51 TreeView tests now pass in browser mode. |
|
2bdbc12
into
dependabot/npm_and_yarn/vitest-d24016cca7
Bumps the vitest group with 4 packages:
@vitest/browser,@vitest/browser-playwright,@vitest/eslint-plugin, andvitest(4.0.15 → 4.0.16).CI Failure Analysis
The
vitest4.0.16 update exposed a pre-existing hang insrc/TreeView/TreeView.test.tsx. The root cause was twofold:testTimeoutto 15 seconds (PR #9167), after it was accidentally changed in a prior release.perf(TreeView): defer scrollIntoView(perf(TreeView): defer scrollIntoView to coalesce reflows during rapid navigation #7545) introduced arequestAnimationFramein the TreeView item focus handler.vi.useFakeTimers()was faking rAF, causingact()+userEventinteractions that focus a tree item to wait for a fake rAF that never fires — hanging indefinitely and timing out after 15 seconds. The remaining 39 failures cascaded from that first timeout.Fix: Changed both
vi.useFakeTimers()calls inTreeView.test.tsxto use{ toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'setImmediate', 'clearImmediate'] }, explicitly excludingrequestAnimationFramefrom faking. All existingvi.runAllTimers()calls forsetTimeout-based behavior continue to work correctly. All 51 TreeView tests now pass in browser mode.Changelog
New
Changed
src/TreeView/TreeView.test.tsx: Updatedvi.useFakeTimers()calls to not fakerequestAnimationFrame, fixing test hangs in vitest browser mode (Chromium)Removed
Rollout strategy
Testing & Reviewing
All 51 TreeView browser-mode tests now pass. The fix is scoped entirely to the test file — no production code was changed.
Merge checklist
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.