diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-16 15:03:54 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-16 15:03:54 +0200 |
| commit | 283c876aff2c1a5477955140df783a70ab76dbd8 (patch) | |
| tree | 5a3dbdce25e549fbed983ed839fdad39c9d3d21f /web/frontend/official-climb-profile-logic.test.ts | |
| parent | df7c9b5130ba193fc918a947a461f2a70dc2dd3c (diff) | |
feat(web): improve official climb profile
Diffstat (limited to 'web/frontend/official-climb-profile-logic.test.ts')
| -rw-r--r-- | web/frontend/official-climb-profile-logic.test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/frontend/official-climb-profile-logic.test.ts b/web/frontend/official-climb-profile-logic.test.ts index 31391b2..32521da 100644 --- a/web/frontend/official-climb-profile-logic.test.ts +++ b/web/frontend/official-climb-profile-logic.test.ts @@ -11,11 +11,13 @@ test("selects a display step that keeps long profiles readable", () => { test("assigns each slope to its color band", () => { assert.equal(profileBandForSlope(-0.1), "downhill"); + assert.equal(profileBandForSlope(0), "downhill"); + assert.equal(profileBandForSlope(0.1), "0-3"); assert.equal(profileBandForSlope(2.9), "0-3"); assert.equal(profileBandForSlope(3), "3-6"); assert.equal(profileBandForSlope(6), "6-9"); - assert.equal(profileBandForSlope(9), "9-12"); - assert.equal(profileBandForSlope(12), "12-plus"); + assert.equal(profileBandForSlope(9), "9-plus"); + assert.equal(profileBandForSlope(12), "9-plus"); }); test("interpolates profile sections at the selected step", () => { |