mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-19 06:18:55 +00:00
Replace the organizationInfoCall mock with a vi.mock of the useOrganizations hook module that stubs useOrganization (and organizationKeys, which the component still imports for invalidation). Each test now sets mockUseOrganization.mockReturnValue(...) instead of mocking the underlying network call, matching the existing pattern in TeamInfo.test.tsx. Renders go through the canonical renderWithProviders helper from tests/test-utils so the component's useQueryClient() call has a QueryClientProvider in context. This is the standard wrapper used by ~96 other test files in the dashboard. Fixes "No QueryClient set" failures in the 4 organization_view tests introduced by the imperative-fetch -> useOrganization migration.