test(ui): mock query client in cost optimization view
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Krrish Dholakia 2026-07-23 21:45:29 +00:00
parent 8a73b16aa7
commit 3488ef4ccc

View file

@ -3,6 +3,10 @@ import { describe, expect, it, vi } from "vitest";
const mockUserDailyActivityCall = vi.fn();
vi.mock("@tanstack/react-query", () => ({
useQuery: () => ({ data: undefined, isLoading: false, isFetching: false, error: null }),
}));
vi.mock("@/components/networking", () => ({
userDailyActivityCall: (...args: unknown[]) => mockUserDailyActivityCall(...args),
getToolSpend: vi.fn().mockResolvedValue({ by_tool: [], daily: [], total_spend: 0, start_date: null, end_date: null }),