Commit graph

2 commits

Author SHA1 Message Date
google-labs-jules[bot]
6c61e6058e test: improve detectDateOrder testing with real locales
Refactored `detectDateOrder` in `src/engine/datetime.ts` to accept an optional `locale` argument. This allows `src/engine/datetime.test.ts` to directly verify actual Date-Month-Year and Month-Day-Year ordering using real native `Intl.DateTimeFormat` outputs for "en-GB" and "en-US", rather than faking the API output with spies. This vastly improves the realism and robustness of these tests.

Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
2026-08-09 10:05:02 +00:00
Horizontal42
d71ad92422 add tests for datetime.ts
Covers detectDateOrder, resolveZone, addToDate and isCalendarUnit —
none of it had direct unit coverage before, only indirectly through
the engine's date-arithmetic tests.
2026-07-08 14:01:34 +03:00