mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Adjust order of operations in ISO{Date,MonthDay}FromFields
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/7dd90dc
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 10:10:26 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/569c2dc1d0 Pull-request: https://github.com/SerenityOS/serenity/pull/14278 Reviewed-by: https://github.com/Dexesttp
@@ -113,13 +113,13 @@ describe("errors", () => {
|
||||
test("missing fields", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDateTime.from({});
|
||||
}).toThrowWithMessage(TypeError, "Required property year is missing or undefined");
|
||||
}).toThrowWithMessage(TypeError, "Required property day is missing or undefined");
|
||||
expect(() => {
|
||||
Temporal.PlainDateTime.from({ year: 0 });
|
||||
Temporal.PlainDateTime.from({ year: 0, day: 1 });
|
||||
}).toThrowWithMessage(TypeError, "Required property month is missing or undefined");
|
||||
expect(() => {
|
||||
Temporal.PlainDateTime.from({ year: 0, month: 1 });
|
||||
}).toThrowWithMessage(TypeError, "Required property day is missing or undefined");
|
||||
Temporal.PlainDateTime.from({ month: 1, day: 1 });
|
||||
}).toThrowWithMessage(TypeError, "Required property year is missing or undefined");
|
||||
});
|
||||
|
||||
test("with 'reject' overflow option", () => {
|
||||
|
||||
Reference in New Issue
Block a user