mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Convert errant MUST to TRY in Temporal.PlainDateTime.with
This commit is contained in:
parent
c3fc8996bf
commit
d5b26183f3
Notes:
github-actions[bot]
2025-01-17 09:09:14 +00:00
Author: https://github.com/trflynn89
Commit: d5b26183f3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3275
2 changed files with 9 additions and 1 deletions
|
@ -80,4 +80,12 @@ describe("errors", () => {
|
|||
new Temporal.PlainDateTime(1970, 1, 1).with({ timeZone: {} });
|
||||
}).toThrowWithMessage(TypeError, "Object must be a partial Temporal object");
|
||||
});
|
||||
|
||||
test("invalid ISO date range", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(-271821, 4, 19, 0, 0, 0, 0, 0, 1);
|
||||
|
||||
expect(() => {
|
||||
plainDateTime.with({ nanosecond: 0 });
|
||||
}).toThrowWithMessage(RangeError, "Invalid plain date time");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue