mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:07:35 +00:00
LibJS: Adjust order of operations in ISO{Date,MonthDay}FromFields
This is a normative change in the Temporal spec.
See: 7dd90dc
This commit is contained in:
parent
3bc54ac75a
commit
569c2dc1d0
8 changed files with 32 additions and 40 deletions
|
@ -21,6 +21,6 @@ describe("errors", () => {
|
|||
const calendar = new Temporal.Calendar("iso8601");
|
||||
expect(() => {
|
||||
calendar.era({});
|
||||
}).toThrowWithMessage(TypeError, "Required property year is missing or undefined");
|
||||
}).toThrowWithMessage(TypeError, "Required property day is missing or undefined");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,6 +21,6 @@ describe("errors", () => {
|
|||
const calendar = new Temporal.Calendar("iso8601");
|
||||
expect(() => {
|
||||
calendar.eraYear({});
|
||||
}).toThrowWithMessage(TypeError, "Required property year is missing or undefined");
|
||||
}).toThrowWithMessage(TypeError, "Required property day is missing or undefined");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("errors", () => {
|
|||
test("month or monthCode field is required", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
expect(() => {
|
||||
calendar.monthDayFromFields({ year: 2021 });
|
||||
calendar.monthDayFromFields({ year: 2021, day: 1 });
|
||||
}).toThrowWithMessage(TypeError, "Required property month is missing or undefined");
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue