mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibJS: Remove faulty assertion in BalanceDurationRelative
This is an editorial change in the Temporal spec.
See: 66f7464
This commit is contained in:
parent
d2c1dd5454
commit
2b764b3594
2 changed files with 17 additions and 2 deletions
|
@ -161,4 +161,16 @@ describe("errors", () => {
|
|||
"A starting point is required for balancing calendar units"
|
||||
);
|
||||
});
|
||||
|
||||
// Spec Issue: https://github.com/tc39/proposal-temporal/issues/2124
|
||||
// Spec Fix: https://github.com/tc39/proposal-temporal/commit/66f7464aaec64d3cd21fb2ec37f6502743b9a730
|
||||
test("balancing calendar units with largestUnit set to 'year' and relativeTo unset throws instead of crashing", () => {
|
||||
const duration = new Temporal.Duration(1);
|
||||
expect(() => {
|
||||
duration.round({ largestUnit: "year" });
|
||||
}).toThrowWithMessage(
|
||||
RangeError,
|
||||
"A starting point is required for balancing calendar units"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue