mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibJS: Implement Temporal.PlainDate.prototype.withCalendar
This commit is contained in:
parent
8123e957e3
commit
9fa8f19a0f
4 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.PlainDate.prototype.withCalendar).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const firstPlainDate = new Temporal.PlainDate(1, 1, 1);
|
||||
expect(firstPlainDate.calendar).not.toBe(calendar);
|
||||
const secondPlainDate = firstPlainDate.withCalendar(calendar);
|
||||
expect(secondPlainDate.calendar).toBe(calendar);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue