1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 08:44:58 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Temporal/Duration
Shannon Booth a7316d3641 LibJS: Update Temporal RoundDuration AO to some spec changes
This commit effectively just does a bulk update of this function to the
spec. Since there have been so many spec changes, no specific change was
made in mind, and many FIXMEs have been left for where we are still out
of date.

These changes also appear to include a normative change to the temporal
spec which was previously resulting in timeouts for some tests, and is
now resulting in a timeout.

Furthermore, this also resolves some crashes by protecting against
division by zero, instead throwing a RangeError. This can only happen
when a custom calender is provided which returns funky values. See:

https://github.com/tc39/proposal-temporal/commit/ed85e9

Diff Tests:
    +8     -4 💀    -4 💥
2024-01-14 16:08:52 -07:00
..
Duration.compare.js LibJS: Reject relativeTo string such as "2022-08-18T17:01Z" 2022-10-17 12:56:05 +02:00
Duration.from.js LibJS: Implement parsing of TemporalDurationString 2021-11-28 10:32:28 +00:00
Duration.js
Duration.prototype.@@toStringTag.js
Duration.prototype.abs.js
Duration.prototype.add.js LibJS: Implement Temporal.Duration.prototype.add 2021-11-29 22:56:35 +00:00
Duration.prototype.blank.js
Duration.prototype.days.js
Duration.prototype.hours.js
Duration.prototype.microseconds.js
Duration.prototype.milliseconds.js
Duration.prototype.minutes.js
Duration.prototype.months.js
Duration.prototype.nanoseconds.js
Duration.prototype.negated.js
Duration.prototype.round.js LibJS: Update Temporal RoundDuration AO to some spec changes 2024-01-14 16:08:52 -07:00
Duration.prototype.seconds.js
Duration.prototype.sign.js
Duration.prototype.subtract.js LibJS: Implement Temporal.Duration.prototype.subtract 2021-11-29 22:56:35 +00:00
Duration.prototype.toJSON.js LibJS: Implement Temporal.Duration.prototype.toJSON() 2021-11-07 15:31:28 +01:00
Duration.prototype.toLocaleString.js LibJS: Implement Temporal.Duration.prototype.toLocaleString() 2021-11-07 15:31:28 +01:00
Duration.prototype.toString.js LibJS: Implement Temporal.Duration.prototype.toString() 2021-11-07 15:31:28 +01:00
Duration.prototype.total.js LibJS: Implement Temporal.Duration.prototype.total() 2021-11-13 18:50:54 +00:00
Duration.prototype.valueOf.js
Duration.prototype.weeks.js
Duration.prototype.with.js LibJS: Disallow Temporal.Duration input values to be non-integers 2021-11-17 22:20:59 +00:00
Duration.prototype.years.js