mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
LibJS: Implement Temporal.PlainDate.prototype.calendar
This commit is contained in:
parent
94e1324a67
commit
94322ea985
3 changed files with 47 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
describe("correct behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const plain_date = new Temporal.PlainDate(1, 1, 1, calendar);
|
||||
expect(plain_date.calendar).toBe(calendar);
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "calendar", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue