Files
litellm/ui/litellm-dashboard/tests
yuneng-jiangandClaude Sonnet 4.6 2285dc78b9 [Fix] UI - resolve flaky tests from leaked @tremor/react Tooltip timer
Local vi.mock("@tremor/react") overrides in router_settings tests were
clobbering the global setupTests.ts mock, re-introducing the real Tooltip
component which schedules a setTimeout. When jsdom tears down after each
test file, the pending timer fires and hits window is not defined, which
Vitest flags as an unhandled error that can cause false positive failures
in subsequent tests (including the create_mcp_server timeout in CI).

Fix: add Switch to the global @tremor/react mock in setupTests.ts (the
only reason the local overrides existed), then remove the three local
vi.mock("@tremor/react") blocks so all test files inherit the global mock
with properly stubbed Button, Tooltip, and Switch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:28:27 -08:00
..
2025-12-03 23:46:09 -08:00
2025-12-11 16:33:23 -08:00