summaryrefslogtreecommitdiff
path: root/web/frontend/ride-detail-logic.test.ts
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-17 13:18:25 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-17 13:18:25 +0200
commit706edc84d855ea46d3c8faee82090cfaf0a7b515 (patch)
treefbb6700d5d6f515734dcf410310d01134cfeeaea /web/frontend/ride-detail-logic.test.ts
parentb626f15b6e40311143cdec91728046dc79e0d328 (diff)
feat(web): mark climb boundaries on ride maps
Diffstat (limited to 'web/frontend/ride-detail-logic.test.ts')
-rw-r--r--web/frontend/ride-detail-logic.test.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/frontend/ride-detail-logic.test.ts b/web/frontend/ride-detail-logic.test.ts
index a3f143e..471eb49 100644
--- a/web/frontend/ride-detail-logic.test.ts
+++ b/web/frontend/ride-detail-logic.test.ts
@@ -6,6 +6,7 @@ import {
cotacolForClimb,
elevationAtDistance,
formatClimbLabel,
+ formatClimbBoundaryLabel,
formatDistance,
formatElevation,
nearestPointIndex,
@@ -46,6 +47,11 @@ test("formats profile climb labels with category", () => {
assert.equal(formatClimbLabel({ name: "Ventoux", category: "HC", cotacol: 600, kind: "official" }), "Ventoux (HC)");
});
+test("formats climb boundary labels", () => {
+ assert.equal(formatClimbBoundaryLabel(0, "start"), "Climb 1 start");
+ assert.equal(formatClimbBoundaryLabel(2, "end"), "Climb 3 end");
+});
+
test("formats profile labels consistently", () => {
assert.equal(formatDistance(2.4), "2.4 km");
assert.equal(formatDistance(12.4), "12 km");