fix: Update API mock path for useProxyHosts tests to ensure correct functionality

This commit is contained in:
Wikid82
2025-11-19 20:23:21 -05:00
parent 21eb2d2608
commit 6f289d3fc7
@@ -3,17 +3,14 @@ import { renderHook, waitFor, act } from '@testing-library/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import React from 'react'
import { useProxyHosts } from '../useProxyHosts'
import * as api from '../../services/api'
import * as api from '../../api/proxyHosts'
// Mock the API
vi.mock('../../services/api', () => ({
proxyHostsAPI: {
list: vi.fn(),
get: vi.fn(),
create: vi.fn(),
update: vi.fn(),
delete: vi.fn(),
},
vi.mock('../../api/proxyHosts', () => ({
getProxyHosts: vi.fn(),
createProxyHost: vi.fn(),
updateProxyHost: vi.fn(),
deleteProxyHost: vi.fn(),
}))
const createWrapper = () => {