import { describe, expect, it } from 'vitest' import { getGoogleMapsDirectionsUrl, getGoogleMapsPlaceUrl } from '@/lib/googleMapsNavigation' describe('googleMapsNavigation', () => { it('builds a driving-directions URL with origin and destination coordinates', () => { expect(getGoogleMapsDirectionsUrl({ lat: 35.7, lng: 51.4 }, { lat: 35.8, lng: 51.5 })).toBe( 'https://www.google.com/maps/dir/?api=1&origin=35.7%2C51.4&destination=35.8%2C51.5&travelmode=driving' ) }) it('builds a destination fallback URL', () => { expect(getGoogleMapsPlaceUrl({ lat: 35.7, lng: 51.4 })).toBe('https://www.google.com/maps/search/?api=1&query=35.7%2C51.4') }) })