Replace naive timezone offset calculation with a verification loop.
Try plausible offsets (CET/CEST), verify against actual offset at
candidate timestamp, and return the first match. This correctly
handles daylight saving time transitions in Vienna.
Mark completed items in CHECKLIST.md. Update API tests to use
NextRequest instead of Request and fix type assertions. Add missing
imports in unit tests for calendar and countdown utils.
Replace mock data in geocoding, HAFAS, and bike routing clients with
actual implementations using fetch and appropriate interfaces. Update
typescript definitions to match the new data structures, including
Journey, Station, and BikeRoute. Add vitest and related testing
dependencies, replacing the placeholder test script with actual tests
for the new client logic. Refactor calendar and countdown utilities to
use the new types and remove unused files.
Implement real API clients and update types
Replace mock data in HafasClient, GeocodingClient, and
BikeRoutingClient with actual fetch implementations. Update
types to match API responses and add Vitest tests.
- Set fixed test port before requiring server
- Mock global fetch to avoid external network calls
- Implement server readiness check via health endpoint
- Add explicit mock assertions for HAFAS proxy tests
- Split large test block into focused describe sections