import { beforeEach, vi } from "vitest"

// Mock fetch globally
const mockFetch = vi.fn()
global.fetch = mockFetch

// Reset mocks before each test
beforeEach(() => {
  vi.clearAllMocks()
  mockFetch.mockClear()
})

// Export mock for use in tests
export { mockFetch }
