Summary
The computePriceChange helper computes a signed percentage but has no unit tests covering all three outcome signs. Tests should explicitly verify positive, negative, and zero change and confirm the result is always rounded to two decimal places.
Scope
- Test oldest snapshot 100, latest 150 → returns 50.00
- Test oldest snapshot 200, latest 100 → returns -50.00
- Test oldest snapshot 100, latest 100 → returns 0.00
- Test a fractional result (oldest 3, latest 4) → returns 33.33 (rounded, not truncated)
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The
computePriceChangehelper computes a signed percentage but has no unit tests covering all three outcome signs. Tests should explicitly verify positive, negative, and zero change and confirm the result is always rounded to two decimal places.Scope
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram