Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

ui fix

Ishaan Jaffer826ebfae1cce
diff --git a/ui/litellm-dashboard/src/components/tag_management/components/CreateTagModal.test.tsx b/ui/litellm-dashboard/src/components/tag_management/components/CreateTagModal.test.tsx
index f073b6298ca..073c97fec0d 100644
--- a/ui/litellm-dashboard/src/components/tag_management/components/CreateTagModal.test.tsx
+++ b/ui/litellm-dashboard/src/components/tag_management/components/CreateTagModal.test.tsx
@@ -1,5 +1,5 @@
-import { describe, it, expect, vi, beforeEach, beforeAll } from "vitest";
-import { render, screen, waitFor } from "@testing-library/react";
+import { describe, it, expect, vi, beforeEach, beforeAll, afterEach } from "vitest";
+import { render, screen, waitFor, cleanup } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import CreateTagModal from "./CreateTagModal";
@@ -44,6 +44,13 @@ describe("CreateTagModal", () => {
beforeEach(() => {
vi.clearAllMocks();
+ vi.useFakeTimers();
+ });
+
+ afterEach(() => {
+ cleanup();
+ vi.clearAllTimers();
+ vi.useRealTimers();
});
it("should submit form with correct values when user creates a tag", async () => {
@@ -91,6 +98,9 @@ describe("CreateTagModal", () => {
// Verify onCancel was not called
expect(mockOnCancel).not.toHaveBeenCalled();
+
+ // Clear any pending timers before test ends
+ vi.runOnlyPendingTimers();
});
});