fix: resolve TypeScript any types and unused variable warnings

This commit is contained in:
Wikid82
2025-11-28 06:27:00 +00:00
parent c123fe52fd
commit d2f0226679
12 changed files with 25 additions and 23 deletions

View File

@@ -94,7 +94,7 @@ const renderWithClient = (ui: React.ReactElement) => {
import { testProxyHostConnection } from '../../api/proxyHosts'
describe('ProxyHostForm', () => {
const mockOnSubmit = vi.fn((_data: any) => Promise.resolve())
const mockOnSubmit = vi.fn(() => Promise.resolve())
const mockOnCancel = vi.fn()
beforeEach(() => {
@@ -183,7 +183,7 @@ describe('ProxyHostForm', () => {
})
it('tests connection successfully', async () => {
(testProxyHostConnection as any).mockResolvedValue({})
vi.mocked(testProxyHostConnection).mockResolvedValue(undefined)
renderWithClient(
<ProxyHostForm onSubmit={mockOnSubmit} onCancel={mockOnCancel} />
@@ -202,7 +202,7 @@ describe('ProxyHostForm', () => {
})
it('handles connection test failure', async () => {
(testProxyHostConnection as any).mockRejectedValue(new Error('Connection failed'))
vi.mocked(testProxyHostConnection).mockRejectedValue(new Error('Connection failed'))
renderWithClient(
<ProxyHostForm onSubmit={mockOnSubmit} onCancel={mockOnCancel} />