Skip to content

Comments

Thorough tests for ISO-like calendar math#3201

Merged
Ms2ger merged 1 commit intomainfrom
iso-like-calendar-tests
Feb 6, 2026
Merged

Thorough tests for ISO-like calendar math#3201
Ms2ger merged 1 commit intomainfrom
iso-like-calendar-tests

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Dec 9, 2025

Splits test/thorough/gregorian.mjs into two new test files:

  • calendarisolike.mjs tests that the year and month differences for the four ISO-like calendars are equal to the same differences calculated in the ISO calendar.

  • calendardaymath.mjs tests that week and day differences for all non-ISO calendars (except, temporarily, 'chinese' and 'dangi') are equal to the same differences calculated in the ISO calendar. (Days are always equivalent, and weeks are always 7 days in all currently supported calendars.)

This is in order to test the simplest invariants in other non-ISO calendars and not just 'gregory'.

@ptomato

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (f75dea7) to head (2f7fe75).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3201   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files          22       22           
  Lines       10464    10464           
  Branches     1808     1808           
=======================================
  Hits        10265    10265           
  Misses        182      182           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ptomato ptomato force-pushed the iso-like-calendar-tests branch from 2669387 to f527f86 Compare December 9, 2025 21:07
Splits test/thorough/gregorian.mjs into two new test files:

- calendarisolike.mjs tests that the year and month differences for the
  four ISO-like calendars are equal to the same differences calculated
  in the ISO calendar.

- calendardaymath.mjs tests that week and day differences for all non-
  ISO calendars (except, temporarily, 'chinese' and 'dangi') are equal
  to the same differences calculated in the ISO calendar. (Days are
  always equivalent, and weeks are always 7 days in all currently
  supported calendars.)

This is in order to test the simplest invariants in other non-ISO
calendars and not just 'gregory'.
@ptomato ptomato force-pushed the iso-like-calendar-tests branch from f527f86 to 2f7fe75 Compare February 5, 2026 16:57
@Ms2ger Ms2ger merged commit a7616ea into main Feb 6, 2026
10 checks passed
@Ms2ger Ms2ger deleted the iso-like-calendar-tests branch February 6, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants