Add unit tests for computeDays and GPX overnight roundtrip
- compute-days.test.ts: 8 tests covering single day, two days, three days, ascent/descent, edge cases (first/last overnight, single waypoint, empty) - generate.test.ts: 4 new tests for isDayBreak emission, GPX roundtrip with isDayBreak preserved, and splitByDay multi-track output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
774e2b1ae3
commit
77174f192d
3 changed files with 196 additions and 2 deletions
|
|
@ -42,9 +42,9 @@
|
|||
|
||||
## 8. Testing
|
||||
|
||||
- [ ] 8.1 Unit tests for `computeDays()`: single day (no overnight), two days, three days, empty route, single waypoint, overnight on first/last waypoint edge cases
|
||||
- [x] 8.1 Unit tests for `computeDays()`: single day (no overnight), two days, three days, empty route, single waypoint, overnight on first/last waypoint edge cases
|
||||
- [ ] 8.2 Unit tests for `overnight.ts` helpers: set/clear/check overnight on Y.Map
|
||||
- [ ] 8.3 Unit tests for GPX roundtrip: generate with `isDayBreak`, parse back, verify `isDayBreak` preserved
|
||||
- [x] 8.3 Unit tests for GPX roundtrip: generate with `isDayBreak`, parse back, verify `isDayBreak` preserved
|
||||
- [ ] 8.4 Unit tests for `dayBreaks` extraction in route update logic
|
||||
- [ ] 8.5 E2E test: add waypoints, toggle overnight on one, verify sidebar shows day breakdown with correct stats
|
||||
- [ ] 8.6 E2E test: export GPX with day breaks, verify downloaded file contains overnight metadata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue