import { describe, it, expect, vi } from 'vitest'
import { GET } from './route'

vi.mock('@/lib/anac', () => ({
  getAnacZones: vi.fn().mockResolvedValue([]),
  anacZonesToGeoJSON: vi.fn().mockReturnValue({ type: 'FeatureCollection', features: [] }),
}))

describe('GET /api/anac/zones', () => {
  it('returns 200 with GeoJSON FeatureCollection', async () => {
    const res = await GET()
    expect(res.status).toBe(200)
    const data = await res.json()
    expect(data.type).toBe('FeatureCollection')
  })
})
