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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix flaky tests
yuneng-jiang0d329826f10d
diff --git a/ui/litellm-dashboard/src/components/entity_usage.test.tsx b/ui/litellm-dashboard/src/components/entity_usage.test.tsxindex d5cc503fd10..17016b6479d 100644--- a/ui/litellm-dashboard/src/components/entity_usage.test.tsx+++ b/ui/litellm-dashboard/src/components/entity_usage.test.tsx@@ -168,16 +168,18 @@ describe("EntityUsage", () => {});it("should render with organization entity type and call organization API", async () => {- const { getByText, getAllByText } = render(<EntityUsage {...defaultProps} entityType="organization" />);+ render(<EntityUsage {...defaultProps} entityType="organization" />);await waitFor(() => {expect(mockOrganizationDailyActivityCall).toHaveBeenCalled();});- expect(getByText("Organization Spend Overview")).toBeInTheDocument();+ expect(screen.getByText("Organization Spend Overview")).toBeInTheDocument();- const spendElements = getAllByText("$100.50");- expect(spendElements.length).toBeGreaterThan(0);+ await waitFor(() => {+ const spendElements = screen.getAllByText("$100.50");+ expect(spendElements.length).toBeGreaterThan(0);+ });});it("should switch between tabs", async () => {