mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.withCalendar
This commit is contained in:
parent
4c4482c7f6
commit
f657c86d58
3 changed files with 33 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.PlainDateTime.prototype.withCalendar).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const firstPlainDateTime = new Temporal.PlainDateTime(1, 2, 3);
|
||||
expect(firstPlainDateTime.calendar).not.toBe(calendar);
|
||||
const secondPlainDateTime = firstPlainDateTime.withCalendar(calendar);
|
||||
expect(secondPlainDateTime.calendar).toBe(calendar);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue