From 0115bfa52343ef49d7ed5e5e1c90102577d7b51f Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Fri, 3 Jul 2026 14:19:30 -0700 Subject: [PATCH] test(ui): quiet vitest CI logs by silencing passing-test console output The ui_unit_tests CircleCI job logged ~45k lines for a single run, most of it React act() warnings, antd deprecation notices and component stack traces emitted as console output by passing tests, which buried real failures. Set silent: "passed-only" (Vitest 3.2+) gated on process.env.CI so console output from passing tests is suppressed while a failing test still prints its logs and full stack trace. Also drop two stray console.log calls in UsagePageView that dumped the whole currentUser object on every render in production, not just tests. Verified by running the suite the way CI does (CI=true npm run test -- --run --pool forks --poolOptions.forks.maxForks=6): 45,075 lines before, 981 after, all 4075 tests still passing. A throwaway failing test confirms its console.log and assertion diff remain visible. --- .../src/components/UsagePage/components/UsagePageView.tsx | 2 -- ui/litellm-dashboard/vitest.config.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx index 432a499a0f6..37c2a25c6a6 100644 --- a/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx +++ b/ui/litellm-dashboard/src/components/UsagePage/components/UsagePageView.tsx @@ -81,8 +81,6 @@ const UsagePage: React.FC = ({ teams, organizations }) => { const { data: customers = [] } = useCustomers(); const { data: agentsResponse } = useAgents(); const { data: currentUser } = useCurrentUser(); - console.log(`currentUser: ${JSON.stringify(currentUser)}`); - console.log(`currentUser max budget: ${currentUser?.max_budget}`); const isAdmin = all_admin_roles.includes(userRole || ""); const canViewTagUsage = isAdmin || internalUserRoles.includes(userRole || ""); diff --git a/ui/litellm-dashboard/vitest.config.ts b/ui/litellm-dashboard/vitest.config.ts index d2b6e7b43bf..01c451933b5 100644 --- a/ui/litellm-dashboard/vitest.config.ts +++ b/ui/litellm-dashboard/vitest.config.ts @@ -8,6 +8,7 @@ export default defineConfig({ globals: true, css: true, // lets you import CSS/modules without extra mocks testTimeout: 30000, + silent: process.env.CI ? "passed-only" : false, coverage: { provider: "v8", reporter: ["text", "lcov"],