litellm/ui/litellm-dashboard/tests
yuneng-jiang 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
..
view_logs added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
CreateKeyPage.expiredToken.test.tsx Unit tests 2025-12-03 23:46:09 -08:00
setupTests.ts [Fix] UI - resolve flaky tests from leaked @tremor/react Tooltip timer 2026-02-28 10:28:27 -08:00
test-utils.tsx Migrate MCP servers to react query 2025-12-22 14:33:38 -08:00
top_key_view.test.tsx rename 2025-12-11 16:33:23 -08:00