fix: resolve TypeScript build errors in test files

- Remove unused React imports in AgentStatusIndicator and WebSocketIndicator tests
- Fix Response type cast in api-helpers test (as unknown as Response)
This commit is contained in:
Brad Groux 2026-01-29 15:55:23 -06:00
parent c250a5a60f
commit a7973e14d9
3 changed files with 2 additions and 4 deletions

View file

@ -1,7 +1,6 @@
/**
* Tests for components/shared/AgentStatusIndicator.tsx — agent status states.
*/
import React from 'react';
import { describe, it, expect, vi, afterEach } from 'vitest';
import { render, screen, cleanup } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

View file

@ -1,7 +1,6 @@
/**
* Tests for components/shared/WebSocketIndicator.tsx — status indicator states.
*/
import React from 'react';
import { describe, it, expect, afterEach } from 'vitest';
import { render, screen, cleanup } from '@testing-library/react';
import { WebSocketStatusProvider } from '@/contexts/WebSocketContext';

View file

@ -11,7 +11,7 @@ function jsonResponse(body: unknown, status = 200): Response {
ok: status >= 200 && status < 300,
status,
json: async () => body,
} as Response;
} as unknown as Response;
}
function brokenJsonResponse(status = 200): Response {
@ -21,7 +21,7 @@ function brokenJsonResponse(status = 200): Response {
json: async () => {
throw new SyntaxError('Unexpected token');
},
} as Response;
} as unknown as Response;
}
// ── Tests ────────────────────────────────────────────────────