Skip to content

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Dec 10, 2025

Adds a thorough test file for each type, testing that it can be constructed using its from() static method, from variations on ISO strings and property bags.

Also includes the commit from #3200 distributing the "interesting" durations a bit more throughout the testing space, to avoid rebase conflicts.

I noticed that we hardly had any tests with large numbers in the years,
months, weeks, or days fields of durations, or non-calendar durations
with days. This removes some of the randomly generated durations from
the existing categories and adds randomly generated durations from the
categories named above, so that makeDurationCases() has a mix of
durations that are better distributed throughout the testing space.

Also pulls each category of randomly generated durations out into its
own array, and concats them in makeDurationCases(), to allow for
adjusting the mix during debugging.

Updates the snapshots accordingly.
Adds a thorough test file for each type, testing that it can be
constructed using its from() static method, from variations on ISO
strings and property bags.
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.74%. Comparing base (2cee76a) to head (1cfb1ea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3202   +/-   ##
=======================================
  Coverage   96.74%   96.74%           
=======================================
  Files          22       22           
  Lines       10348    10348           
  Branches     1859     1859           
=======================================
  Hits        10011    10011           
  Misses        287      287           
  Partials       50       50           

☔ 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.

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