mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
LibJS: Add Temporal.Calendar.prototype.dateFromFields & required AOs
This is required for implementing the DateFromFields PlainDate AO.
This commit is contained in:
parent
7a33a5c9b5
commit
1e471e2e2f
11 changed files with 350 additions and 1 deletions
|
@ -0,0 +1,11 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 2", () => {
|
||||
expect(Temporal.Calendar.prototype.dateFromFields).toHaveLength(2);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
const date = calendar.dateFromFields({ year: 2000, month: 5, day: 2 });
|
||||
expect(date.calendar).toBe(calendar);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue