Skip to content

Add unit tests for reportUnmatchedStopClusters#86

Open
Vishmayraj wants to merge 1 commit into
OneBusAway:mainfrom
Vishmayraj:main
Open

Add unit tests for reportUnmatchedStopClusters#86
Vishmayraj wants to merge 1 commit into
OneBusAway:mainfrom
Vishmayraj:main

Conversation

@Vishmayraj

Copy link
Copy Markdown

stop_clusters.go was the only file in internal/metrics/ without a
corresponding test file.

This PR adds stop_clusters_test.go covering the following cases:

  • Empty stop map reports no metrics
  • Stop with no parent and valid coordinates uses S2 clustering
  • Station type stop clusters by its own ID
  • Malformed stop with no parent and no coordinates is skipped
  • Multiple stops in the same station cluster are aggregated correctly

All existing tests continue to pass.

@CLAassistant

CLAassistant commented Mar 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants