diff --git a/src/api/IntelGpuDataContext.test.tsx b/src/api/IntelGpuDataContext.test.tsx index 4eb9750..dc61f85 100644 --- a/src/api/IntelGpuDataContext.test.tsx +++ b/src/api/IntelGpuDataContext.test.tsx @@ -155,17 +155,9 @@ describe('IntelGpuDataProvider', () => { it('treats a hanging CRD request as unavailable after 2s timeout', async () => { vi.useFakeTimers(); const nodeWrapper = { jsonData: {} }; - vi.mocked(K8s.ResourceClasses.Node.useList).mockReturnValue([ - [nodeWrapper], - null, - ] as any); - vi.mocked(K8s.ResourceClasses.Pod.useList).mockReturnValue([ - [nodeWrapper], - null, - ] as any); - vi.mocked(ApiProxy.request).mockRejectedValue( - new Error('Request timed out after 2000ms') - ); + vi.mocked(K8s.ResourceClasses.Node.useList).mockReturnValue([[nodeWrapper], null] as any); + vi.mocked(K8s.ResourceClasses.Pod.useList).mockReturnValue([[nodeWrapper], null] as any); + vi.mocked(ApiProxy.request).mockRejectedValue(new Error('Request timed out after 2000ms')); const { result } = renderHook(() => useIntelGpuContext(), { wrapper: Wrapper });