import { render } from "@testing-library/react"; import type { ReactNode } from "react"; import { describe, expect, it, vi } from "vitest"; import LocationPicker from "@/components/map/LocationPicker"; const setView = vi.fn(); const locate = vi.fn(); const zoomIn = vi.fn(); const zoomOut = vi.fn(); const eventMap = { setView, locate }; const controlMap = { zoomIn, zoomOut }; vi.mock("leaflet", () => { class LatLng { lat: number; lng: number; constructor(lat: number, lng: number) { this.lat = lat; this.lng = lng; } } class Control { addTo() { return this; } remove() {} } return { default: { Control, DomUtil: { create: () => ({ style: {} }), }, DomEvent: { disableClickPropagation: () => {}, disableScrollPropagation: () => {}, }, }, LatLng, }; }); vi.mock("react-leaflet", () => ({ MapContainer: ({ children }: { children: ReactNode }) =>