Skip to content

test: add hook tests for useNearbyStops and useVehicleArrivals#86

Merged
z4ab merged 1 commit into
mainfrom
feat/issue-77-hook-tests
Jun 16, 2026
Merged

test: add hook tests for useNearbyStops and useVehicleArrivals#86
z4ab merged 1 commit into
mainfrom
feat/issue-77-hook-tests

Conversation

@z4ab

@z4ab z4ab commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Adds 10 new tests covering:

useNearbyStops (5 tests):

  • Stop data transformation (snake_case → camelCase)
  • Null/empty field handling
  • wheelchair_boarding mapping
  • Query disabled when center is null
  • Error propagation

useVehicleArrivals (5 tests):

  • Full arrivals transformation including all stop fields
  • Empty stops array handling
  • Null/optional field handling
  • Query disabled when vehicleId is null
  • Error propagation

Closes #77

Covers fetching, transformation (snake_case to camelCase),
null/empty field handling, disabled query state, and error propagation.

Closes #77
@z4ab
z4ab merged commit 0719760 into main Jun 16, 2026
@railway-app
railway-app Bot temporarily deployed to grt-bus-tracker / bus-tracker-pr-86 June 16, 2026 14:28 Destroyed
@z4ab
z4ab deleted the feat/issue-77-hook-tests branch June 25, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add hook tests for useNearbyStops and useVehicleArrivals

1 participant