mirror of
https://github.com/monoscope-tech/monoscope.git
synced 2026-11-16 10:18:01 +00:00
test(reports): pin the report date labels to the project's timezone
renderWeeklyEmail takes 14 parameters, which is why its timezone behaviour was never tested — nobody was going to build that fixture. Extracting the pure core makes a two-line doctest sufficient. reportDayLabels pins the invariant rather than a happy path: the same UTC instant must label 2026-03-02 in Auckland and 2026-03-01 in UTC, which is the actual bug (a customer getting an email dated a day behind the week it covers). Both an empty and an unrecognised zone fall back to UTC rather than failing. The offsets were verified independently against the IANA database (Auckland is UTC+13 on both dates; NZDT runs to April 5 2026) rather than asserted. The doctest itself runs on the next doctests pass — cabal test doctests cannot be run while the test-dev watcher holds the build dir. Also: commit7c225496claims this fix but contains only T.unwords -> unwords in Mail.hs. The real change is in364d728a; that message is orphaned.
This commit is contained in:
parent
e6f3bcb3f5
commit
4940a9f7b6
1 changed files with 25 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue